Hello all,
I am working on a website statistics engine for a class. The idea being that you can simply embed a little code in your web page which will call the stats website on every page load and the stats website will then track your hits and such… nothing ground breaking.
What I would like to do is be able to break down website hits by webpage. For instance, a person can include the same code on each page, and the stats website will know which page got hit how many times. Is there a way in PHP to obtain the URL of the calling page (the page on which the embedded code exists)? I know how to get the URL of the page in which the PHP code is running, but not the calling page.
Alternatively, I could probably use some JavaScript to pass the page URL to the stats website, but the less code that needs to be embedded the better so I’m hoping for a PHP solution.
Thanks in advance for any and all help!