 | Welcome to Dnforum.com
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast and simple so please, join our community today!
If you have any problems with the registration process or your account login, please contact us. |  |
10-28-2006, 11:27 PM
|
#1 (permalink)
| | Platinum Lifetime Member
Last Online: Today 01:30 AM Join Date: Dec 2003
Posts: 1,307
DNF$: 2,925
Country: | 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 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: |
| |
11-27-2006, 04:35 PM
|
#2 (permalink)
| | Platinum Lifetime Member
Name: Kev Last Online: 06-16-2008 07:49 PM Join Date: Oct 2006
Posts: 20
DNF$: 154 Location: Greatest Country in the World: USA
Country: | 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;
} |
| |
11-27-2006, 07:13 PM
|
#3 (permalink)
| | Platinum Lifetime Member
Name: (/ _ \) Last Online: Yesterday 10:23 PM Join Date: Nov 2006
Posts: 1,009
DNF$: 10 Location: Texan living in Japan
Country: | Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page Quote:
Originally Posted by 01010101 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.FlashMap.jp | <<< The First Interactive Mobile Flash Map for Mobile Devices |
| |
11-27-2006, 11:50 PM
|
#4 (permalink)
| | Platinum Lifetime Member
Last Online: Today 01:30 AM Join Date: Dec 2003
Posts: 1,307
DNF$: 2,925
Country: | Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page Quote:
Originally Posted by MobileDesigner 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?  |
| |
11-28-2006, 01:55 PM
|
#5 (permalink)
| | Platinum Lifetime Member
Name: Kev Last Online: 06-16-2008 07:49 PM Join Date: Oct 2006
Posts: 20
DNF$: 154 Location: Greatest Country in the World: USA
Country: | 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 |
| |
11-28-2006, 03:13 PM
|
#6 (permalink)
| | Platinum Lifetime Member
Last Online: Yesterday 04:24 PM Join Date: Sep 2003
Posts: 1,881
DNF$: 2,789 Location: Cleveland, OH | 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?
__________________ brandable .coms bixid | bamsy | fritsy | alarn | TAKEN | thunter | sizel | zaplon | jotch | gurew
qrud | nibber | zambor | waxar | voople | foove | baxar | exnor | sqig | fadez | woors | murps |
| |
11-28-2006, 03:16 PM
|
#7 (permalink)
| | Platinum Lifetime Member
Last Online: Today 12:50 AM Join Date: Sep 2006
Posts: 786
DNF$: 1,862 Location: Ohio
Country: | Re: Detect cellphone user at non-.mobi site and redirect to cellphone-formatted page Quote:
Originally Posted by namewaiter 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...
__________________ |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| | | | All times are GMT -4. The time now is 01:33 AM.
Copyright @2001-2008 DNForum.com
|