You need to try a  broader check. You can use regular expressions for this:

if ( eregi( "ie", $HTTP_USER_AGENT ) ) ## IE browsers (all versions)
{
 ## do something
}
else ## all other browsers
{ 
     ## do something
}

The regular expression "eregi" is a case-insensitive search. You can use ereg for 
case-sensitive search.
There is also the "perl" regular expression function: preg_match, where you use perl 
like regular expressions. So, 
the above code would look like this:

if ( preg_match( "/ie/i", $HTTP_USER_AGENT ) ) ## IE browsers (all versions)
{
 ## do something
}
else ## all other browsers
{ 
     ## do something
}

In this case, the regex "/ie/i" .. the 'i' aftere the last '/' signifies a 
case-insensitive search.

Hope this helps! It works for me.
Good luck,
Nicole Amashta
www.aeontrek.com



"Fabian Hoffmann" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all!
> 
> I need your for a buggi PHP-Skript!
> 
> At the start of my Page my Script must automaticly decide between IE or
> other Explorers!! Because the Iex Version is another then the Netscape
> Version!!
> 
> My Scipt at the moment:
> 
> <?php
> 
> if($HTTP_USER_AGENT=="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)")
> 
> {?>
> 
> <meta http-equiv="refresh" content="0;URL=deutsch/index.php?con=home.htm">
> 
> <?}
> 
> else
> 
> {?>
> 
> <meta http-equiv="refresh" content="0;URL=cnv/index.htm">
> 
> <?}?>
> 
> The Problem is I cant write all Iex versions into the script... or I wont
> ...
> 
> Have anyone an idea ?????????????
> 
> 




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to