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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-11-2009, 02:00 PM   #1
Bird
Confirmed User
 
Bird's Avatar
 
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
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 02:04 PM   #2
seeandsee
Check SIG!
 
seeandsee's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
Quote:
Originally Posted by Bird View Post
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");

    }


?>
thanks for sharing
__________________
BUY MY SIG - 50$/Year

Contact here
seeandsee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 02:05 PM   #3
munki
Do Fun Shit.
 
munki's Avatar
 
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
munki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 02:07 PM   #4
BSleazy
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
BSleazy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 03:11 PM   #5
harvey
Confirmed User
 
harvey's Avatar
 
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
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 03:21 PM   #6
Allison
Confirmed User
 
Allison's Avatar
 
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

Allison is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 03:24 PM   #7
Bird
Confirmed User
 
Bird's Avatar
 
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
Quote:
Originally Posted by harvey View Post
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
Thanks for the links
__________________
ICQ:268731675
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 03:26 PM   #8
Allison
Confirmed User
 
Allison's Avatar
 
Join Date: Jul 2001
Location: http://www.topbucks.com
Posts: 2,068
Quote:
Originally Posted by Bird View Post
Thanks for the links
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

Allison is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 05:58 PM   #9
CaptainHowdy
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.
CaptainHowdy is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2009, 06:06 PM   #10
Gausche
Confirmed User
 
Gausche's Avatar
 
Join Date: Feb 2009
Posts: 140
Nicely done Bird
__________________

Adult Videos on your mobile
Mobile Porn - vic at mobilporn dot mobi
Gausche is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2009, 12:46 PM   #11
Bird
Confirmed User
 
Bird's Avatar
 
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
Quote:
Originally Posted by CaptainHowdy View Post
Keepin' this one ON TOP!
For those who missed is yesterday
__________________
ICQ:268731675
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.