scriptygoddess

30 Jul, 2003

More Referer Scripts

Posted by: Jennifer In: Bookmarks

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.

10 Responses to "More Referer Scripts"

1 | Jason

July 30th, 2003 at 11:36 am

Avatar

I've already seen some people coming from Scriptygoddess.com to my website since Jenn posted this article.

2 | Stu

July 30th, 2003 at 3:07 pm

Avatar

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…

3 | Jennifer

July 30th, 2003 at 3:18 pm

Avatar

Jason is the author of that post and script… I'm just the messenger. :) But he is getting comments emailed to him…

4 | Jason

July 30th, 2003 at 3:28 pm

Avatar

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)

5 | zannie

July 31st, 2003 at 4:47 pm

Avatar

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. :)

6 | Jason

August 1st, 2003 at 8:28 am

Avatar

I've posted Day 3 of the Referer Scripts Tutorial.

7 | Stu

August 1st, 2003 at 10:37 am

Avatar

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';

8 | Stu

August 1st, 2003 at 10:43 am

Avatar

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.

9 | Stu

August 1st, 2003 at 10:49 am

Avatar

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

10 | chris

August 4th, 2003 at 5:33 pm

Avatar

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

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements