pulling server data for my counter
Posted: Thu Sep 26, 2002 9:22 am
Hey group!
I have a question for ya..
I'm building a counter for my site and I'd like to pull as much data as I can from each visit and I'd like to see how some of you do this.
I'm primarily talking about the $_SESSION['HTTP_USER_AGENT']
it's giving me strings such as:
1. Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q31
2. Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
3. Mozilla/5.0 (X11; U; Linux i686; en-US; Nautilus/1
4. Lynx/2.8.5dev.3 libwww-FM/2.14 SSL-MM/1.4.1 OpenSS
5. Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gec
6. Mozilla/4.77 [en] (Win95; U)
7. gnome-vfs/1.0.4
I can look at them and pretty much tell what most of them are, except i'm not quite so sure why line 7 returned so little. Anyway.. I've been using the SELECT FROM tbl WHERE data LIKE '%$type%' statement to get into the string and pull out the browser and soon the OS. My question is primarily with line #6. I know that's Netscape because i asked a friend to hit the site with Netscape, but I don't see really where it's different enough to search with WHERE LIKE.
Can anyone help me out with some ideas?
Also, does anyone have anyother things they like to pull in a counter that would be helpfull to web developers? (i.e. Screen Res, Color Depth)
Oh, and one other thing.. (last one i promise).. when i capture $_SERVER['REMOTE_ADDR'] i'm not getting the address of the machine that the browser is running on, but i think i'm getting the router sometimes.. so my IP's are per visitor. any Ideas??
Thanks Much
Will
I have a question for ya..
I'm building a counter for my site and I'd like to pull as much data as I can from each visit and I'd like to see how some of you do this.
I'm primarily talking about the $_SESSION['HTTP_USER_AGENT']
it's giving me strings such as:
1. Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q31
2. Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
3. Mozilla/5.0 (X11; U; Linux i686; en-US; Nautilus/1
4. Lynx/2.8.5dev.3 libwww-FM/2.14 SSL-MM/1.4.1 OpenSS
5. Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gec
6. Mozilla/4.77 [en] (Win95; U)
7. gnome-vfs/1.0.4
I can look at them and pretty much tell what most of them are, except i'm not quite so sure why line 7 returned so little. Anyway.. I've been using the SELECT FROM tbl WHERE data LIKE '%$type%' statement to get into the string and pull out the browser and soon the OS. My question is primarily with line #6. I know that's Netscape because i asked a friend to hit the site with Netscape, but I don't see really where it's different enough to search with WHERE LIKE.
Can anyone help me out with some ideas?
Also, does anyone have anyother things they like to pull in a counter that would be helpfull to web developers? (i.e. Screen Res, Color Depth)
Oh, and one other thing.. (last one i promise).. when i capture $_SERVER['REMOTE_ADDR'] i'm not getting the address of the machine that the browser is running on, but i think i'm getting the router sometimes.. so my IP's are per visitor. any Ideas??
Thanks Much
Will