Take a look at what is printed by:
var_dump($_SERVER);
Maybe the HTTP_USER_AGENT can lead you to somewhere out of this problem.
Manu.
"Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]Hi,site
I have created an online system, and have created a WAP version, and am
currently crreating a PDA version. What I wuold like to to do is give out
the same URL instead of domain.com for normal use, domain.com/wap/ or
domain.com/pda/. Is there a way of detecting what device is loading theand redirect them accordingly?
Thanks for your help
Manuel, Shaun,
$_SERVER['HTTP_USER_AGENT'] (just like anything else from the client side) can't be trusted to either exist, or to be correct. Some user agents don't set this value, and it's quite easy for it to be faked. More to the point, there's no way you can possibly account for all possible user agents out there... perhaps only the popular ones.
So, $_SERVER['HTTP_USER_AGENT'] is a good starting point or method for guessing where to send people, but it's not fail safe AT ALL.
I think the fail safe way is to create pages which are standards compliant (XHTML strict) and use CSS for all styling/presentation, which means your pages will accessible via the largest possible number of viewing devices, like PDA, WAP, text-to-speech, desktop browsers, Web TV, etc.
The move away from table based layouts and poorly accessible webpages is a big one, but not THAT big :)
Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php