scriptygoddess

14 May, 2002

future use: browser and OS info

Posted by: Jennifer In: Projects

Found this code over at www.php.net – I just packaged it up into a file you can drop on your server and look at…

Not really useful on its own… but maybe on a future project, it might be (like a hit tracking app?)

Download the file here.

See it working here.

5 Responses to "future use: browser and OS info"

1 | Tobias

May 14th, 2002 at 1:20 pm

Avatar

a hit-tracker? Don't really need that, there's already a kick-ass one out there: PHLOGGER

2 | Jennifer

May 14th, 2002 at 1:26 pm

Avatar

I've played around with it… but didn't care for the interface… I've been wanting to make a custom one for myself. a) just for the practice of it and b) so I get *exactly* the info I want, easily… I'm so picky! LOL!

3 | Tobias

May 14th, 2002 at 1:32 pm

Avatar

hehehehe, so what info exactly would that be?

4 | Amy

May 14th, 2002 at 1:36 pm

Avatar

For those of you doing skinnable sites, there's a really practical application for digging up some of this information.

I perform* the following two checks on all of my pages:

if ((stristr($HTTP_USER_AGENT,"avant")) or (stristr($HTTP_USER_AGENT,"WAP")))
{
$skin = "13";
}
if (stristr($HTTP_USER_AGENT,"lynx"))
{
$skin = "3";
}

If the user_agent matches 'avant' or 'wap' they're either using AvantGo or a web-enabled phone, and they should be routed to the pda-friendly version of my site.

If their user_agent is lynx, they can handle the full text of my site, but it should be presented in a lynx-friendly manner. Thus, the lynx-friendly skin.

Now if only we could set something up so that if version number matches 4.7, we could automatically install a real browser on that machine…

* this code was written pre-PHP4.1. PHP after 4.1 supports this version but it's deprecated…I really need to update this to the new version.

5 | Lynda

May 14th, 2002 at 2:55 pm

Avatar

ROFL Amy about the 4.7. 😉

I've been meaning to do something like that for a while.

I've been meaning to do a lot of things for a while… lol :) Thanks for the tip!

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