Mobile Redirect Code Update
Posted by Quimby Melton on January 11, 2007
For an up-to-date list of posts/comments on this topic and a link to the most current version of the script(s), visit the MOBILE REDIRECT CODE DISCUSSION INDEX.
Thanks to a helpful hint from Danielle, the following code strings need to be inserted into the mobile.php code previously discussed.
$_SERVER['HTTP_USER_AGENT']==’SAMSUNG-SGH-D900′) {
header(“location: $mobile”); } elseif(
$_SERVER['HTTP_USER_AGENT']==’SAMSUNG-SGH-D900/1′) {
header(“location: $mobile”); } elseif(
This will ensure the automatic redirection of Samsung D900 devices.
I’m still having trouble redirecting Blackberry devices so anyone wishing to post a suggestion or email it to info@studiohyperset.com is most welcome to do so.
Mobile Redirect Update « hyper/boʊl/e said
[...] Mobile Redirect Code Update [...]
Detecting and automatically redirecting website visitors who visit a standard webpage / website on mobile, handheld, wireless, PDA, or cel / cell phone devices / browsers to a mobile version of the webpage or website « hyper/boʊl/e said
[...] Mobile Redirect Code Update [...]
Adam said
Might be better to throw all the strings into an array and use in_array and strpos to identify them so you can leave out version numbers and prepare for updates!
Ralph Buchfelder said
..as Adam says – it is better
0)
{
header(“location: $mobile”);
echo ‘Mobile Device detected’;
break;
}
}
?>
….