More Referer Scripts
I like to know some things about the people who visit my site. Most of the people are lurkers and don’t leave comments so I’ve been developing some referer scripts. Some other statistics I’ve started to develop are Browser Agents, Operating Systems, Search Engines and Visitor Locations.
I thought some of these scripts might be useful to other people, so I’m trying to package them up into neat little functions that anybody with MySQL and PHP on their site can use them.
I’ve started writing a “tutorial” of sorts about how to gather information about the people visiting your web site. I just posted “Day 1.” Day 2 may not necessarily follow tomorrow, but it will be coming soon.
July 30th, 2003 at 11:36 am
I’ve already seen some people coming from Scriptygoddess.com to my website since Jenn posted this article.
July 30th, 2003 at 3:07 pm
Jennifer, Seeing as at least 10% of your visitors are Mac (and probably a lot more that are getting reported as other), I would think you would be interested in recording Safari as an agent. I would guess this would account for most of your other agent.
Just a thought…
July 30th, 2003 at 3:18 pm
Jason is the author of that post and script… I’m just the messenger.
But he is getting comments emailed to him…
July 30th, 2003 at 3:28 pm
Stu,
I’m not leaving Safari out on purpose. I don’t have a Mac myself, so I can’t test to see what the HTTP_USER_AGENT string looks like. If you can tell me that, I’ll add a test for Safari to my script.
BTW, if anybody is following along, I’ll post the script for displaying browser and os data late tonight or early tomorrow (EDT)
July 31st, 2003 at 4:47 pm
I’m not sure if i’m using the same script or not, however, I clicked on the referrer script link, the one by Dean Allen and installed that and it doesn’t seem to jive with pMachine….. specifically the mailing lists portion. Wasn’t sure if that was a known bug - or a bug at all - or something that *I* did wrong, but I just thought I’d report back.
August 1st, 2003 at 8:28 am
I’ve posted Day 3 of the Referer Scripts Tutorial.
August 1st, 2003 at 10:37 am
Well 30 seconds of Goolging for HTTP_USER_AGENT safari
revealed
http://www.xiven.com/blog.php?start=34&count=1
Or if you want it immediately:
elseif(strstr($_SERVER['HTTP_USER_AGENT'],”Safari/”)) {$useragent = ‘Safari’;
August 1st, 2003 at 10:43 am
Also your code for identifying Mac’s might need a little work. Some agents refer to them as PowerPC, not PPC or Mac. Just an extra clause might get you more precise statistics.
August 1st, 2003 at 10:49 am
This web page seems to have a good list of user agents:
http://www.hofflergroup.com/public/HitCount.xml?summaryField=user_agent
You can see what you are by doing a refresh, and seeing which count goes up. My Mac OS X with Safari seems to be:
mozilla/5.0 (macintosh; u; ppc mac os x; en-us) applewebkit/85 (khtml, like gecko) safari/85
August 4th, 2003 at 5:33 pm
if you are looking for stats on who visits your sites…
awstats provides alot of information including browser, OS, robot hits… etc…
awstats.sourceforge.net