On Fri, Feb 13, 2004 at 11:57:59AM +1100, PETCOL wrote:
> Then I need to take the user to another page.
>
> <? php
>
> if (strstr($HTTP_USER_AGENT,'Windows CE')) {
> //go to the Windows CE version of the site
> } else {
> // go to or Stay on the large version
> }
>
> ?>
Hopefully you're aware that $HTTP_USER_AGENT is an unreliable variable,
in that it is sent by the client, and can contain virtually anything.
I saw a response letting you know how to do this, but I would recommend
not sending people to different pages based on which browser/OS they're
using.
The most I would use $HTTP_USER_AGENT for is if I'm presenting a list of
different OSes (say, for links to OS-specific downloads), and I want to
select an intelligent default.
It should be possible to use CSS/(X)HTML to present your content in a
way that is accessible to whichever browser accesses your site. IMHO,
browser-sniffing to serve different content is a bad idea.
</$.02>
--
[ joel boonstra | gospelcom.net ]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php