toxitalk Posted June 10, 2006 Share Posted June 10, 2006 Hi guys any info you can give would be great.I want to write some php/mysql that I will host on my server (it has php and mysql on it)so far I have written a hit counter app, that just records total hits. (which seeing as it works is cool)I want to now go the full monty and do the same sort of thing that statcounter offers, that is from any webspace some javascript calls come php on my server to do all the bells and whistle thing.The issues Im having it to do with two things.1) Im using the http_referer, but all its returning is where the php is running from, not the remote webpage (the page Im trying to record the stats for). (whats the correct command and form I should be using).2) if I can solve the above, then the next stage is to record the search engine refering(or other webpage) link that goes to the remote page in the first place.So in away im trying to do a trace? (if that makes any sense) but with url instead of ip.finally can you also obtain the search terms used to get to the remote page.Many thanksMark. Quote Link to comment https://forums.phpfreaks.com/topic/11654-remotley-hosting-web-stats/ Share on other sites More sharing options...
Ninjakreborn Posted June 10, 2006 Share Posted June 10, 2006 For one try[a href=\"http://www.sitestats.com\" target=\"_blank\"]Site Stats[/a]That might be something you will want to consider, other than that, I don't have a lot to offer other than some suggestions.1. Possible have php pick up Ip address, browser version and model, and whatever else you can pick up and email it to a specific email address everytime they come, this could let you keep track of where they go. Or create a database, with lot of columns likeip address(this will be your main field and what you sort by).browser typebrowser versionbrowser makejavascript enabled(can be picked up with javascript, and passed via variables into php, then used as information).whether they have java enabled(have no idea)and check for some other stuff like what operating systemthen you can have a counter labeledvisits, and if you want to get fancy 1 table for visitswith 1 column for each web page.then when they enter it records a new number for that ip into the ip database, and you can tell how many time each ip address has visited each page, if you want to get even fancier maybe something to check and find out what order they went in, like have a control panel for yourself, where you can call the data from the database, and arrange it so that it appears based on ip, then IN ORDER what places they visited, maybe even record time and dates.Another thing you could do is pick a webhost with good stats.I use bluehost, but also there's isn't what I wanted.You could also learn to read the log and be able to tell more from reading it than you could from stat informaiton.Just some thoughts. Quote Link to comment https://forums.phpfreaks.com/topic/11654-remotley-hosting-web-stats/#findComment-44004 Share on other sites More sharing options...
poirot Posted June 10, 2006 Share Posted June 10, 2006 For that you can use Awstats, Webalizer or similar ready-made script:[a href=\"http://awstats.sourceforge.net/\" target=\"_blank\"]http://awstats.sourceforge.net/[/a][a href=\"http://www.mrunix.net/webalizer/\" target=\"_blank\"]http://www.mrunix.net/webalizer/[/a]Although usually servers with PHP support do have these script installed. Quote Link to comment https://forums.phpfreaks.com/topic/11654-remotley-hosting-web-stats/#findComment-44020 Share on other sites More sharing options...
toxitalk Posted June 12, 2006 Author Share Posted June 12, 2006 Sorted.As stated I wanted to host stats for others (like statcounter).Anyway to cut a long story short. I have done it with php and a little sprinkle of javascript. (with javascript on the client page you can grab current url and referer url, i then pass it to my php.- magic)cheers anyway guys.Mark Quote Link to comment https://forums.phpfreaks.com/topic/11654-remotley-hosting-web-stats/#findComment-44545 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.