Hello,
don't know much about PHP. trying to convert the following into php from perl
if ($ENV{HTTP_USER_AGENT} =~ /compatible; MSIE [0-9]/ && $ENV{HTTP_USER_AGENT}!~ /Opera/) { ... }
Opera can be set to identify itself as IE, However the user agent for Opera
contains both "MSIE" and "Opera"when you do this. The above script says in perl if IE and not Opera then i can do what i want.
i started with this for a php script
<?php
$user_agent = $_SERVER["HTTP_USER_AGENT"];
$pos = strpos($user_agent, "MSIE");
if($pos) header("Location: http://www.domainname.com");
?>
how can i add to the $pos is "MSIE" and not "Opera" to do the if? I specifically want to detect and direct IE users to a page and Opera users to another page.