hyper/boʊl/e

a delightful dish of Studio Hyperset news and information

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.

4 Responses to “Mobile Redirect Code Update”

  1. [...] Mobile Redirect Code Update [...]

  2. [...] Mobile Redirect Code Update [...]

  3. 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!

  4. ..as Adam says – it is better :)

    0)
    {
    header(“location: $mobile”);
    echo ‘Mobile Device detected’;
    break;
    }

    }
    ?>

    ….

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>