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?)
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?)
2 | Jennifer
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!
4 | Amy
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
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!