|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. 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 free 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, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
|
[Tip] How Mobile Detection is Done!!!
For all of you that are just getting in to mobile, This is the first thing that needs to be done before starting your site. Hope this helps all of you get started.
You can download Tera-wurfl at http://tera-wurfl.com/ installation video tutorial: http://mmi.mobiquio.com/resources/wu...all%281%29.htm Code:
<?php
// include the configuration and the class file
require_once('/home/user_account/public_html/yoursite/tera_wurfl/tera_wurfl_config.php');
require_once(WURFL_CLASS_FILE);
// instantiate the class
$myDevice = new tera_wurfl();
// get the capabilites from the user agent and take a look at the
// HTTP-ACCEPT headers in case the user agent is not found
$myDevice->GetDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT'],true);
$cap = $wurflObj->capabilities;
if ( $myDevice->GetDeviceCapability('is_wireless_device') ) {
switch ( $myDevice->GetDeviceCapability('preferred_markup') ) {
case 'wml_1_1':
case 'wml_1_2':
case 'wml_1_3':
$msite='http://yoursite.com/mobile';
break;
case 'xhtml_basic':
case 'html_wi_w3_xhtmlbasic':
$msite='http://yoursite.com/home/';
break;
case 'xhtml_mobileprofile':
case 'html_wi_oma_xhtmlmp_1_0':
case 'xhtml_mp_1.0':
$msite='http://yoursite.com/mobile/';
break;
case 'html_wi_imode_html_1':
case 'html_wi_imode_html_2':
case 'html_wi_imode_html_3':
case 'html_wi_imode_html_4':
case 'html_wi_imode_html_5':
case 'html_wi_imode_compact_generic':
$msite='http://yoursite.com/mobile/';
break;
case 'html_web_3_2':
$msite='http://yoursite.com/mobile/';
break;
case 'html_web_4_0':
$msite='http://yoursite.com/home/';
break;
}
header("Location: $msite");
} else {
// Redirecting web browsers to another URL
header("Location: http://yoursite.com/home");
}
?>
__________________
ICQ:268731675 |
|
|
|
|
|
#2 | |
|
Check SIG!
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Do Fun Shit.
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
|
nice....
__________________
![]() “I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde |
|
|
|
|
|
#4 |
|
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 6,721
|
ProTraffic still has a little mobile traffic left for sale. Not much though
__________________
icq 156131086 |
|
|
|
|
|
#5 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
|
Never tried it, will take a look. Below 3 pages I used for mobile coding
This one works like a charm and it's extremely easy to setup http://detectmobilebrowsers.mobi/ another option (way more complete) that also uses WURFL datbase at http://www.brainhandles.com/techno-t...obile-browsers there are some nice tricks and tips at http://mobiforge.com/developing/stor...-detection-php
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth |
|
|
|
|
|
#6 |
|
Confirmed User
Join Date: Jul 2001
Location: http://www.topbucks.com
Posts: 2,068
|
One tip for whatever mobile detection script you use is to analyze your statistics (admob or google analytics or sever logs). Look at the traffic that you're sending off to a mobile page or ask your sponsor to provide their user agent stats to ensure it's working the way you want it to.
There is no 100% full proof method, scripts will either detect a little too little mobile, or could also detect way too much due to the parameters they look for. Not all devices call themselves out as "mobile" and if you look for a parameter too short it could cause too many false positives resulting in certain types of PC traffic being sent to a mobile device. Our policy for topbucksmobile.com is to keep the detection script conservative versus risk anyone's PC traffic. ~Alli
__________________
Allison President TopBucks.com| PinkVisual.com| [email protected] Follow Me on Twitter: http://www.twitter.com/PV_Alli ICQ: 120353154 Check out PVLocker.com
|
|
|
|
|
|
#7 | |
|
Confirmed User
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
|
Quote:
__________________
ICQ:268731675 |
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Jul 2001
Location: http://www.topbucks.com
Posts: 2,068
|
Hey Bird... if you have a moment can you hit me up on icq. Question to ask you. 120353154
__________________
Allison President TopBucks.com| PinkVisual.com| [email protected] Follow Me on Twitter: http://www.twitter.com/PV_Alli ICQ: 120353154 Check out PVLocker.com
|
|
|
|
|
|
#9 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,792
|
Keepin' this one ON TOP!
__________________
Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted Windows VPS now available Great for TSS, Nifty Stats, remote work, virtual assistants, etc. |
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Feb 2009
Posts: 140
|
Nicely done Bird
__________________
|
|
|
|
|
|
#11 |
|
Confirmed User
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
|
__________________
ICQ:268731675 |
|
|
|