I have taken an endeavor to create my own web traffic counter service, so far my learning were as follows
(1)information like current page, referral url, browser info, and system info can be extracted from client's browser using a java script code.
(3)To accomplish above task we can use a dummy <img> tag which is pointing to one foreign php file, this file has ability to process the java script variables into database.
I can successfully run my counter under the same domain name but when it comes to different website the script fails to execute, i have followed all above concept.
Then there is one discrepancy from real example of statcounter an example script is here
<!-- Start of StatCounter Code -->
<!-- End of StatCounter Code -->
In this script they are loading the variables from another domain called statcounter.com and then are no variable in img src line i can see which contains the user information.
Please help me to resolve this problem