Pocket PC User Agent Strings

Here is a Pocket PC User Agent String for PHP which will allow a user to be redirected to the PPC version of a site: Just needs to be modified to .asp (and of course the PPC website needs to be created).

<?
$ua=$_SERVER[“HTTP_USER_AGENT”];

$location=’pocket/index.php’;

if (stristr($ua, “Windows CE”) or stristr($ua, “AvantGo”) or stristr($ua, “Mazingo”) or stristr($ua, “Mobile”) or stristr($ua, “T68”) or stristr($ua, “Syncalot”))
{
header (“Location: $location”);

exit;
}
?>

Comments

comments