Redirect by PC or mobile access

php code as follows:

$iswap = isset($_SERVER[‘HTTP_ACCEPT’])? $_SERVER[‘HTTP_ACCEPT’]:”;
if(strpos($iswap,”wap”)>0)
{
@header(“Location: /wap/”);
}