1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

html red script for web/wap? help please

Discussion in 'General Scripting Chat' started by BigTroll, Oct 29, 2014.

  1. BigTroll

    BigTroll Elite Member

    Joined:
    Oct 15, 2014
    Messages:
    1,702
    Likes Received:
    621
    Occupation:
    CPA
    Location:
    2009
    I need a script for my "A" domain to redirect web users to "B" domain and wap users to the "C" domain.
     
  2. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    707
    Likes Received:
    267
    Location:
    PHP Scripting ;)
    This is definitely doable.

    The questions is, free stuff of paid one? I can code one if you cant find anything for free.
     
  3. BigTroll

    BigTroll Elite Member

    Joined:
    Oct 15, 2014
    Messages:
    1,702
    Likes Received:
    621
    Occupation:
    CPA
    Location:
    2009
    Damn...some ppl really wants to make money from everything!
     
  4. TrafficWizard

    TrafficWizard Junior Member

    Joined:
    Aug 22, 2014
    Messages:
    160
    Likes Received:
    26
    BigTroll I will give you a hint:

    google for: redirect mobile devices..

    or take this I modified from first link I got I hope you know where to put this :)

    <?php
    $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
    $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
    $palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
    $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
    $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");

    if ($iphone || $android || $palmpre || $ipod || $berry == true)
    {
    header('Location: http://C.com/');
    }
    else
    {
    header('Location: http://B.com/');
    }
    ?>