+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Redirect mobiles to mobile page?

  1. #1
    aliasneo's Avatar
    aliasneo is offline x10Hosting Member aliasneo is an unknown quantity at this point
    Join Date
    Apr 2010
    Location
    England
    Posts
    71

    Redirect mobiles to mobile page?

    Hi guys, I have no idea about php programmming really, but I'm looking for a simple way to redirect mobile browsers to a mobile page (doesn't exist yet) maybe m.elaosta.com or elaosta.com/mobile?

    If they're not mobile, just go to the standard index.html at elaosta.com

    Any help would be appreciated,

    Thanks.
    HTC Hero Custom ROM Developer: Search (NeORoM 2.1)
    ---
    http://Hamids-IT.elaosta.com

  2. #2
    torpeteo is offline x10Hosting Member torpeteo is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    4

    Cool Re: Redirect mobiles to mobile page?

    Hey, check out this site. I think you'll be able to find what you're looking for.

    http://wurfl.sourceforge.net/


  3. #3
    oceanwap's Avatar
    oceanwap is offline x10Hosting Member oceanwap is an unknown quantity at this point
    Join Date
    Nov 2009
    Location
    India
    Posts
    24

    Re: Redirect mobiles to mobile page?

    Since you don't have any idea about Php programming you can't use wurfl. Which is best for creating a mobile site. It is not a best approach to create two sites for two different browsers.A common business logic and different presentations or designs for different mobiles and web browsers are the best approach.Because maintainance of two sites with redundant content won't be easy.Even if you want to create two sites you have to use some server side logic like Php to redirect users to mobile site.Plenty of free and as well as paid scripts available on the web to do that.Just google on wap redirection.

  4. #4
    aliasneo's Avatar
    aliasneo is offline x10Hosting Member aliasneo is an unknown quantity at this point
    Join Date
    Apr 2010
    Location
    England
    Posts
    71

    Re: Redirect mobiles to mobile page?

    Actually my page is just a portal, it's a simple php with a couple of links (check out http://www.elaosta.com) i want to make anotehr version of this for mobile browsers because it doesnt load quite right on some devices. Anyway, I found this link but couldn't figure out exactly how to use this. I have run the generator and made my function call, but now sure how or where I set in the code for it to go to elaosta.com for the normal browsers otherwise go to elaosta.com/mobile.

    http://detectmobilebrowsers.mobi/

    the rest of the pages I link will take care of the mobile device by them selves (google pages and my wordpress blog with mobile theme).
    HTC Hero Custom ROM Developer: Search (NeORoM 2.1)
    ---
    http://Hamids-IT.elaosta.com

  5. #5
    oceanwap's Avatar
    oceanwap is offline x10Hosting Member oceanwap is an unknown quantity at this point
    Join Date
    Nov 2009
    Location
    India
    Posts
    24

    Re: Redirect mobiles to mobile page?

    Just detect the mobile browsers using that function and redirect them. And do this on top of the home page(most probably index.php in document root). So you can redirect the mobile user using header.
    if(it is mobile device)
    {
    header ("Location: http://www../mobile");
    exit;
    }
    Last edited by oceanwap; 05-19-2010 at 10:07 PM.

  6. #6
    oceanwap's Avatar
    oceanwap is offline x10Hosting Member oceanwap is an unknown quantity at this point
    Join Date
    Nov 2009
    Location
    India
    Posts
    24

    Re: Redirect mobiles to mobile page?

    @aliasneo.Your project is so simple and you don't need this. :-)

    I have written this for others who will browse this thread.
    You can Download tera wurfl from http://www.tera-wurfl.com This is database driven api of wurfl faster than php api.
    And run this script
    PHP Code:
    <?php
    require_once('Tera-WURFL/TeraWurfl.php'); //your path to terawurfl.php
    $user_agent $_SERVER['HTTP_USER_AGENT'];
    //For opera mini
    $user_agent = isset( $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] ) ? $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] : $user_agent;
    //Now we will hand over user agent to wurfl
    $wurflObj = new TeraWurfl();
    $wurflObj->getDeviceCapabilitiesFromAgent($user_agent);
    $device $wurflObj->getDeviceCapability("is_wireless_device");
    echo 
    $device;
    ?>
    This is how wurfl works, and there are many capabilities wurfl know about mobile device.For that read documentation on http://wurfl.sourceforge.net most important thing is that this is free and open source.

  7. #7
    dei maru is offline x10Hosting Member dei maru is an unknown quantity at this point
    Join Date
    May 2010
    Location
    Colombia
    Posts
    5

    Thumbs up Re: Redirect mobiles to mobile page?

    Quote Originally Posted by aliasneo View Post
    Hi guys, I have no idea about php programmming really, but I'm looking for a simple way to redirect mobile browsers to a mobile page (doesn't exist yet) maybe m.elaosta.com or elaosta.com/mobile?

    If they're not mobile, just go to the standard index.html at elaosta.com

    Any help would be appreciated,

    Thanks.
    Hola bro.. bueno hace unos dias tenia algo asi tambien tenia ese problema...
    mira lo que encontrar un sitio web llamado http://www.mofusepremium.com/
    el cual me parece muy bueno se llama MoFuse web con el cual podrás crear la versión para móviles de tu página web con tan sólo tres pasos.

    Tan sólo tienes que crearte una cuenta (es gratuito) e introducir los datos de tu página web (dirección y nombre); de esta manera ya tendremos nuestra página web optimizada para móviles en la que incluso, y lo que seguro que atraerá a muchos, podremos introducir el nuevo programa de publicidad de Google para móviles.

    Sitio web: http://www.mofusepremium.com/

    te lo recomiendo chekalo no pierdes nada es muy facil..

  8. #8
    aliasneo's Avatar
    aliasneo is offline x10Hosting Member aliasneo is an unknown quantity at this point
    Join Date
    Apr 2010
    Location
    England
    Posts
    71

    Re: Redirect mobiles to mobile page?

    Quote Originally Posted by oceanwap View Post
    @aliasneo.Your project is so simple and you don't need this. :-)

    I have written this for others who will browse this thread.
    You can Download tera wurfl from http://www.tera-wurfl.com This is database driven api of wurfl faster than php api.
    And run this script
    PHP Code:
    <?php
    require_once('Tera-WURFL/TeraWurfl.php'); //your path to terawurfl.php
    $user_agent $_SERVER['HTTP_USER_AGENT'];
    //For opera mini
    $user_agent = isset( $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] ) ? $_SERVER['HTTP_X_OPERAMINI_PHONE_UA'] : $user_agent;
    //Now we will hand over user agent to wurfl
    $wurflObj = new TeraWurfl();
    $wurflObj->getDeviceCapabilitiesFromAgent($user_agent);
    $device $wurflObj->getDeviceCapability("is_wireless_device");
    echo 
    $device;
    ?>
    This is how wurfl works, and there are many capabilities wurfl know about mobile device.For that read documentation on http://wurfl.sourceforge.net most important thing is that this is free and open source.
    Thanks, but where do I put this? I'm not too sure how it all works.

    Quote Originally Posted by dei maru View Post
    Hola bro.. bueno hace unos dias tenia algo asi tambien tenia ese problema...
    mira lo que encontrar un sitio web llamado http://www.mofusepremium.com/
    el cual me parece muy bueno se llama MoFuse web con el cual podrás crear la versión para móviles de tu página web con tan sólo tres pasos.

    Tan sólo tienes que crearte una cuenta (es gratuito) e introducir los datos de tu página web (dirección y nombre); de esta manera ya tendremos nuestra página web optimizada para móviles en la que incluso, y lo que seguro que atraerá a muchos, podremos introducir el nuevo programa de publicidad de Google para móviles.

    Sitio web: http://www.mofusepremium.com/

    te lo recomiendo chekalo no pierdes nada es muy facil..
    Muchas gracias, pero.....no es libre?
    HTC Hero Custom ROM Developer: Search (NeORoM 2.1)
    ---
    http://Hamids-IT.elaosta.com

  9. #9
    oceanwap's Avatar
    oceanwap is offline x10Hosting Member oceanwap is an unknown quantity at this point
    Join Date
    Nov 2009
    Location
    India
    Posts
    24

    Re: Redirect mobiles to mobile page?

    Quote Originally Posted by aliasneo View Post
    Thanks, but where do I put this? I'm not too sure how it all works.
    http://mobiforge.com/developing/stor...oduction-wurfl
    Articles like these can be helpful.It takes time to understanding how to use wurfl, due to lack of experience in php.
    especially if you are not familier with classes(OOP) in php and databases(DBMS).

    if you encounter any errors then mention here, so we can help.

    more links

    http://www.tera-wurfl.com/wiki/index.php/Downloads
    http://www.tera-wurfl.com/wiki/index.php/Installation
    Last edited by oceanwap; 05-25-2010 at 03:40 AM.

  10. #10
    tera-wurfl is offline x10Hosting Member tera-wurfl is an unknown quantity at this point
    Join Date
    May 2010
    Posts
    2

    Cool Re: Redirect mobiles to mobile page?

    Hey guys, I'm Steve Kamerman, the author of Tera-WURFL. You should let Tera-WURFL figure out which user agent to use by not passing anything to the getDeviceCapabilitiesFromAgent() function. Here's the code to redirect users to a mobile site (replace http://yourwebsite.mobi/ with your mobile site):
    PHP Code:
    <?php
    require_once('./TeraWurfl.php');
    $wurflObj = new TeraWurfl();
    $wurflObj->getDeviceCapabilitiesFromAgent();
     
    // see if this client is on a wireless device
    if($wurflObj->getDeviceCapability("is_wireless_device")){
        
    header("Location: http://yourwebsite.mobi/");
    }
    ?>

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 02-04-2010, 03:34 PM
  2. javascript redirect to main page if subpage called directly
    By slacker3 in forum Programming Help
    Replies: 6
    Last Post: 01-07-2010, 08:10 AM
  3. mobile phone redirect script
    By pietimer in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 08-26-2008, 10:31 PM
  4. Replies: 6
    Last Post: 03-09-2008, 01:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers