does anyone please have a code that would pick up touch phones if they in use, im building a script and one side of it im doing a touch verson but need to redirect a touch phone to the right side if anyone could help, please do, many thanks.
$http=$_SERVER['HTTP_USER_AGENT'];
if((substr($http,0,5)=='Opera' and !strpos($http,'Mini'))
or substr($http,0,7)=='Mozilla'
or substr($http,0,6)=='Galaxy'
or substr($http,0,12)=='AmigaVoyager'
or substr($http,0,=='CyberDog'
or substr($http,0,5)=='Dillo'
or substr($http,0,7)=='HotJava'
or substr($http,0,15)=='IBM WebExplorer'
or substr($http,0,4)=='iCab'
or substr($http,0,10)=='LeechCraft'
or substr($http,0,5)=='Links'
or substr($http,0,4)=='Lynx'
or substr($http,0,11)=='NCSA Mosaic'
or substr($http,0,7)=='NCSA Mosaic'
or substr($http,0,6)=='retawq'
or substr($http,0,6)=='Webkit'
or substr($http,0,4)=='Uzbl'
or substr($http,0,3)=='w3m'
or substr($http,0,12)=='WorldWideweb')
{
header("Location: http://$_SERVER[SERVER_NAME]/index.php"); normal web side
}else{
header("Location: http://$_SERVER[SERVER_NAME]/touch/index.html"); ///touch side
}
this does work but it pick's up phones and pc's
$http=$_SERVER['HTTP_USER_AGENT'];
if((substr($http,0,5)=='Opera' and !strpos($http,'Mini'))
or substr($http,0,7)=='Mozilla'
or substr($http,0,6)=='Galaxy'
or substr($http,0,12)=='AmigaVoyager'
or substr($http,0,=='CyberDog'
or substr($http,0,5)=='Dillo'
or substr($http,0,7)=='HotJava'
or substr($http,0,15)=='IBM WebExplorer'
or substr($http,0,4)=='iCab'
or substr($http,0,10)=='LeechCraft'
or substr($http,0,5)=='Links'
or substr($http,0,4)=='Lynx'
or substr($http,0,11)=='NCSA Mosaic'
or substr($http,0,7)=='NCSA Mosaic'
or substr($http,0,6)=='retawq'
or substr($http,0,6)=='Webkit'
or substr($http,0,4)=='Uzbl'
or substr($http,0,3)=='w3m'
or substr($http,0,12)=='WorldWideweb')
{
header("Location: http://$_SERVER[SERVER_NAME]/index.php"); normal web side
}else{
header("Location: http://$_SERVER[SERVER_NAME]/touch/index.html"); ///touch side
}
this does work but it pick's up phones and pc's
Comment