hi everyone!
I'm trying to create a multipage logging script.
Basically what I want to do is simply add a small amount of code on each page that does something to call the "big script" and logs the visitor information such as time, date, ip, referring url, etc...
All this information will be logged into seperate flat text files.
Then when I access the admin, I can call those files and create reports.
What I want to do, is be able to call a particular page, such as /home/index.phtml
and print out the reports for it..
Referring URLS
4 http://search.yahoo.com/?query=my+site
2 http://phpbuilder.com/links?my+site
IP Address
10 24.09.32.53
1 255.255.255
Browser
40 MSIE 5.5
32 NETSCAPE 4.72
21 Other
Operating System
40 Win 98
21 Win 95
11 Linux
What the numbers mean is how many people were referred using that particular thing.
Now here's what I need help with...
I need help figuring out how I should write the program. Just give me a general outline of each step needed.
Then I need help (actually write the code) that when a matching ip address or referring url, etc is found, to increment the number to 2+.
The next thing i need help writing the code with is how to parse the HTTP_USER_AGENT tag to divide the Operating System, Browser with each version, etc...
Please give me a general outline and write the code for the last two.
I'm going to use a flat text file since i'm not familiar with mysql yet.
Thanks for all your help.