I have to make 2versions of my site, i.e., 1 version for Mobile phone and 1 version for our PC. So I have a script as follows:-
<?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") or stristr($ua, "Blazer") or
stristr($ua,"Mozilla") or stristr($ua,"Firefox") )
{
$DEVICE_TYPE="MOBILE";
}
if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE")
{
$location='mobile/entry.html';
header ('Location: '.$location);
exit;
}
else
{
$location='entry.html';
header ('Location: '.$location);
exit;
}
?>
This script works well with my PC, but if I try to access my site from mobile, I cannot redirect to the same page as I want.
Can anyone help me resolve this issue?
Thanks in Advance.