Answer the question
In order to leave comments, you need to log in
How to make an asynchronous request to collect statistics (JS-PHP)?
Hello.
It is necessary to collect statistics on some parameters of visits. The bottom line is to make an asynchronous script call every time the page is loaded. Did it like this:
<script async="true" src="/stat.php?var=<?=$var?>"></script>
Answer the question
In order to leave comments, you need to log in
in stat.php addheader("Content-Type: application/x-javascript");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question