Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 7 of 7
  1. #1
    Platinum Lifetime Member

    Join Date
    Dec 2003
    Posts
    1,370
    DNF$
    3,197
    Bank
    0
    Total DNF$
    3,197
    Donate  

    Question Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    http://www.dnforum.com/showpost.php?...&postcount=105

    Quote Originally Posted by gemsergio View Post
    What a waiste of an extensionextension .mobi you simply need one line of code that identifies cellphone user and redirect them to the part of the site dedicated to those users.
    What is the best line of code for this? :greensmile:

  2. #2
    Platinum Lifetime Member

    Join Date
    Oct 2006
    Location
    Greatest Country in the World: USA
    Posts
    20
    DNF$
    185
    Bank
    0
    Total DNF$
    185
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    credit goes to mediahound from this forum (he posted this while ago?)

    ## DETECT WAP
    if ( ereg( "text/vnd.wap.wml",strtolower($HTTP_ACCEPT) ) ){
    include"/home/your/wap/index.wml";
    exit;
    }
    switch (true){
    case ereg( "wap" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "wml" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "phone" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "4thpass.com KBrowser" , $HTTP_USER_AGENT ):
    case ereg( "ACER" , $HTTP_USER_AGENT ):
    case ereg( "Alcatel-BE" , $HTTP_USER_AGENT ):
    case ereg( "EPOC" , $HTTP_USER_AGENT ):
    case ereg( "Ericsson" , $HTTP_USER_AGENT ):
    case ereg( "Go.Web" , $HTTP_USER_AGENT ):
    case ereg( "Jingo" , $HTTP_USER_AGENT ):
    case ereg( "Klondike" , $HTTP_USER_AGENT ):
    case ereg( "m-crawler" , $HTTP_USER_AGENT ):
    case ereg( "M3GATE" , $HTTP_USER_AGENT ):
    case ereg( "Mitsu" , $HTTP_USER_AGENT ):
    case ereg( "MOCOCO" , $HTTP_USER_AGENT ):
    case ereg( "MOT" , $HTTP_USER_AGENT ):
    case ereg( "Sony" , $HTTP_USER_AGENT ):
    case ereg( "Nokia" , $HTTP_USER_AGENT ):
    case ereg( "Panasonic" , $HTTP_USER_AGENT ):
    case ereg( "Rainbow" , $HTTP_USER_AGENT ):
    case ereg( "Rover" , $HTTP_USER_AGENT ):
    case ereg( "SAGEM" , $HTTP_USER_AGENT ):
    case ereg( "SAMSUNG" , $HTTP_USER_AGENT ):
    case ereg( "UP" , $HTTP_USER_AGENT ):
    case ereg( "TF Search robot" , $HTTP_USER_AGENT ):
    case ereg( "Webmonkey/0.2 NoComment" , $HTTP_USER_AGENT ):
    include"/home/your/wap/index.wml";
    exit;
    }

  3. #3
    Platinum Lifetime Member
    MobileDesigner's Avatar
    Join Date
    Nov 2006
    Location
    Redmond WA
    Posts
    1,140
    Country

    United States
    DNF$
    834
    Bank
    0
    Total DNF$
    834
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    Quote Originally Posted by 01010101 View Post
    credit goes to mediahound from this forum (he posted this while ago?)

    ## DETECT WAP
    if ( ereg( "text/vnd.wap.wml",strtolower($HTTP_ACCEPT) ) ){
    include"/home/your/wap/index.wml";
    exit;
    }
    switch (true){
    case ereg( "wap" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "wml" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "phone" , strtolower ($HTTP_USER_AGENT) ):
    case ereg( "4thpass.com KBrowser" , $HTTP_USER_AGENT ):
    case ereg( "ACER" , $HTTP_USER_AGENT ):
    case ereg( "Alcatel-BE" , $HTTP_USER_AGENT ):
    case ereg( "EPOC" , $HTTP_USER_AGENT ):
    case ereg( "Ericsson" , $HTTP_USER_AGENT ):
    case ereg( "Go.Web" , $HTTP_USER_AGENT ):
    case ereg( "Jingo" , $HTTP_USER_AGENT ):
    case ereg( "Klondike" , $HTTP_USER_AGENT ):
    case ereg( "m-crawler" , $HTTP_USER_AGENT ):
    case ereg( "M3GATE" , $HTTP_USER_AGENT ):
    case ereg( "Mitsu" , $HTTP_USER_AGENT ):
    case ereg( "MOCOCO" , $HTTP_USER_AGENT ):
    case ereg( "MOT" , $HTTP_USER_AGENT ):
    case ereg( "Sony" , $HTTP_USER_AGENT ):
    case ereg( "Nokia" , $HTTP_USER_AGENT ):
    case ereg( "Panasonic" , $HTTP_USER_AGENT ):
    case ereg( "Rainbow" , $HTTP_USER_AGENT ):
    case ereg( "Rover" , $HTTP_USER_AGENT ):
    case ereg( "SAGEM" , $HTTP_USER_AGENT ):
    case ereg( "SAMSUNG" , $HTTP_USER_AGENT ):
    case ereg( "UP" , $HTTP_USER_AGENT ):
    case ereg( "TF Search robot" , $HTTP_USER_AGENT ):
    case ereg( "Webmonkey/0.2 NoComment" , $HTTP_USER_AGENT ):
    include"/home/your/wap/index.wml";
    exit;
    }
    Got anything else besides wap? If we access this site from Japan, we see the code above on the mobile phones.
    ::: www.MobileDesign.com ::: Mobile Website/App Design Showcase and Resources

  4. #4
    Platinum Lifetime Member

    Join Date
    Dec 2003
    Posts
    1,370
    DNF$
    3,197
    Bank
    0
    Total DNF$
    3,197
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    Quote Originally Posted by MobileDesigner View Post
    Got anything else besides wap? If we access this site from Japan, we see the code above on the mobile phones.
    Uh-oh. Does this mean .mobi might not be a useless extention after all?

  5. #5
    Platinum Lifetime Member

    Join Date
    Oct 2006
    Location
    Greatest Country in the World: USA
    Posts
    20
    DNF$
    185
    Bank
    0
    Total DNF$
    185
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    MobileDesigner..

    Checkout this link. It has info on WURFL as well as sample codes....

    http://pc.dev.mobi/?q=node/18

  6. #6
    Platinum Lifetime Member
    namewaiter's Avatar
    Join Date
    Sep 2003
    Location
    Cleveland, OH
    Posts
    1,915
    DNF$
    2,963
    Bank
    0
    Total DNF$
    2,963
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    if it only takes one line of code added to a site ...

    why do all the big names use a promoted alternate address route, why not just say hit us up from your mobile and have 'this code' redirect?

    http://mobi.orbitz.com | www.careerbuilder.com/mobile | www.microsoft.com/windowsmobile/default.mspx | http://mobile.yahoo.com/

    wouldn't simply using the .mobi extension make it so much easier for the average mobile surfer?
    FOR SALE

  7. #7
    Platinum Lifetime Member

    Join Date
    Sep 2006
    Location
    Ohio
    Posts
    946
    DNF$
    2,344
    Bank
    0
    Total DNF$
    2,344
    Donate  

    Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page

    Quote Originally Posted by namewaiter View Post
    wouldn't simply using the .mobi extension make it so much easier for the average mobile surfer?

    Yes it would, but good luck trying to convince the average .mobi hater of that.

    By the way, I followed the directions from the WURFL article at dev.mobi. I changed a few things so that the site would validate, and so far, so good...


Similar Threads

  1. Replies: 3
    Last Post: 07-20-2006, 04:26 AM
  2. Replies: 0
    Last Post: 01-19-2006, 09:52 AM
  3. Optimizing Flash. Can it be Done?
    By Jeffreyw in forum Web Design
    Replies: 0
    Last Post: 07-16-2005, 01:09 AM
  4. A good SEO checlist
    By Adam Dicker in forum SEO Forum
    Replies: 4
    Last Post: 03-02-2005, 03:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com