$user_agent = $_SERVER["HTTP_USER_AGENT"];
if (
stristr($user_agent, "msie")
|| stristr($user_agent, "mozilla")
|| stristr($user_agent, "opera")
)
{
header ("Location: /web/");
} else {
header ("Location: /wap/");
}
Make sure it's at the top of the page...
Its using stristr which is case insensitive.
Mozilla is the string that shows all mozilla browsers including firefox.
And its using || (the or operandum 😛)
watev.