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 Mark Forums Read
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 05-01-2012, 07:16 PM   #1
mchacal
Confirmed User
 
mchacal's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Canada
Posts: 1,033
Mobile redirect script: screen width or user agent??

Which method is better??
__________________
Webcam Videos and Latina/Ebony Videos
tostadomedia(at)gmail.com | ICQ: 219116429 | Skype: tonio514
mchacal is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2012, 07:19 PM   #2
BIGTYMER
veni vidi vici
 
BIGTYMER's Avatar
 
Industry Role:
Join Date: Nov 2004
Location: Walled Garden
Posts: 16,109
User-Agent.
__________________
I Host @ SecuredServers
BIGTYMER is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2012, 07:24 PM   #3
mchacal
Confirmed User
 
mchacal's Avatar
 
Industry Role:
Join Date: Aug 2007
Location: Canada
Posts: 1,033
Quote:
Originally Posted by BIGTYMER View Post
User-Agent.
Thanks!! Where do you get an updated list of devices?
__________________
Webcam Videos and Latina/Ebony Videos
tostadomedia(at)gmail.com | ICQ: 219116429 | Skype: tonio514
mchacal is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2012, 11:47 PM   #4
BIGTYMER
veni vidi vici
 
BIGTYMER's Avatar
 
Industry Role:
Join Date: Nov 2004
Location: Walled Garden
Posts: 16,109
Quote:
Originally Posted by mchacal View Post
Thanks!! Where do you get an updated list of devices?
I think Garce posted a good one here the other day. I'll try to find it.
__________________
I Host @ SecuredServers
BIGTYMER is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-02-2012, 12:47 AM   #5
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 16,243
I hate mobile redirects. Mine is basically a small computer that is able to make phone calls, it has a genuine 800px wide screen, yet I'm frequently redirected to the bland mobile version.

Anyway, here's what I think:

1) You shouldn't REDIRECT to a different URL. What happens when someone on a mobile shares your URL on social media? Use the same consistent URL and deliver mobile or desktop content dynamically.

2) Offer some way to lock the choice to mobile or desktop, so that people with phones like mine, or who get misdetected as a mobile device, can choose to see the fully featured page.
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-03-2012, 04:35 AM   #6
benk81
Confirmed User
 
Industry Role:
Join Date: Dec 2010
Location: London
Posts: 189
I am attaching below a very basic code for how to detect mobile although there are far more possibilities.
Hope it helps?

<?php
/**
Use to loosely detect a mobile browser
No warranties or guarantees given. Not recomended for production environments.
Loosly Updated from: http://mobiforge.com/developing/stor...-detection-php
We recomend to use: http://wurfl.sourceforge.net/
**/

$MOBILE_BROWSER = 0;

if (preg_match('/(up.browser|up.link|mmp|symbian|midp|wap|phone|and roid|webos|blackberry|mobile|pocket|kindle|psp|mae mo|palm)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) {
$MOBILE_BROWSER++;
}

if (!$MOBILE_BROWSER && (
(strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or
(strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.wml') > 0) or
((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or
isset($_SERVER['HTTP_X_SKYFIRE_PHONE']) or isset($_SERVER['X_DEVICE_USER_AGENT']) or
isset($_SERVER['X_ORIGINAL_USER_AGENT']) or isset($_SERVER['X_MOBILE_UA'])))
)) {
$MOBILE_BROWSER++;
}

$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4));
$mobile_agents = array(
'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird' ,'blac',
'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
'newt','noki','palm','pana','pant','phil','play',' port','prox','qwap',
'sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-',
'siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh',
'tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr',
'webc','winw','winw','xda ','xda-');
if (!$MOBILE_BROWSER && in_array($mobile_ua,$mobile_agents)) {
$MOBILE_BROWSER++;
}

if (!$MOBILE_BROWSER &&
(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'opera mini') > 0) or
(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'opera mobi') > 0) or
(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'windows ce') > 0) or
(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'novarra') > 0)
) {
$MOBILE_BROWSER++;
}

//Some custom code to deal with result
$REGULAR_URL = 'http://www.reporo.com';
$MOBILE_URL = 'http://m.reporo.com';
header('Location: ' . ($MOBILE_BROWSER?$MOBILE_URL:$REGULAR_URL));
__________________
benk81
ICQ 604 518 639
ben (at) reporo . com
benk81 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-03-2012, 04:42 AM   #7
benk81
Confirmed User
 
Industry Role:
Join Date: Dec 2010
Location: London
Posts: 189
As an extra footnote to this post, I believe a combination of screen width and device is probably better.
Those in the know (most by now after so many posts to do with it ha!) will understand the background for mobile and that the key to success is all about billing - that is to say that the person trying to convert the user has better chance if the phone number of the user agent is available to the affiliate program or advertiser at request time.
Clearly the newer devices all have wifi and so if the user connects via this method, the phone number is not availlable meaning a lower conversion method is required such as CC biling.
The older devices all connect via 3G and so the numebr is always available. so there forwe those devices are often defined as smart or dumb by either one of two methods
1. screen width
2. phone capabilities (such as wifi connection or ability to play MP4's etc)

So whilst dumb phones might only make up 5-10% of the volume they could perhaps contribute 20%+ of the revenue. (Remember that high growth countries like latin america only have approx 25% smartphone penetration)

Knowing which device does what and its screen width will allow you to use WURFL effectively and then build a few versions of your site that will render on all devices maximising your potential to make money from all your traffic, not just a portion of it.

Cheers
Ben
__________________
benk81
ICQ 604 518 639
ben (at) reporo . com

Last edited by benk81; 05-03-2012 at 04:44 AM..
benk81 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2012, 12:37 PM   #8
Zeiss
LHP
 
Zeiss's Avatar
 
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 3,473
This goes in your root's htaccess.

Code:
RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} iphone|ipod|android [NC,OR]
RewriteCond %{HTTP_USER_AGENT} up\.browser|up\.link|windows\ ce|iemobile|mini|mmp\|symbian|smartphone|midp|wap|teleca|vodafone|o2|[^i]phone|pocket|kindle|mobile|treo|psp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a\ wa|acer|acs\-|airn|alav|asus|attw|au\-m|aur\ |aus\ |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\-n|bw\-u|beck|benq|bilb|blac|c55\/|cdm\-|chtm|capi|comp|cond|craw|dall|dbte|dc\-s|dica|ds\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\-|fly\_|g\-mo|g1\ u|g560|gf\-5|grun|gene|go\.w|good|grad|hcit|hd\-m|hd\-p|hd\-t|hei\-|hp\ i|hpip|hs\-c|htc\ |htc\-|htca|htcg|htcp|htcs|htct|htc\_|haie|hita|huaw|hutc|i\-20|i\-go|i\-ma|i230|iac\-|iac\/|ig01|im1k|inno|iris|jata|java|kddi|kgt\/|kpt\ |kwc\-|klon|lexi|lg\ g|lg\-a|lg\-b|lg\-c|lg\-d|lg\-f|lg\-g|lg\-k|lg\-l|lg\-m|lg\-o|lg\-p|lg\-s|lg\-t|lg\-u|lg\-w|lg\/k|lg\/l|lg\/u|lg50|lg54|lge\-|lge\/|lynx|leno|m1\-w|m3ga|m50\/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot\ |mot\-|mt50|mtp1|mtv\ |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\-|nem\-|newg|neon|netf|noki|nzph|o2\ x|o2\-x|opwv|owg1|opti|oran|p800|pand|pg\-1|pg\-2|pg\-3|pg\-6|pg\-8|pg\-c|pg13|phil|pn\-2|pt\-g|palm|pana|pire|pock|pose|psio|qa\-a|qc\-2|qc\-3|qc\-5|qc\-7|qc07|qc12|qc21|qc32|qc60|qci\-|qwap|qtek|r380|r600|raks|rim9|rove|s55\/|sage|sams|sc01|sch\-|scp\-|sdk\/|se47|sec\-|sec0|sec1|semc|sgh\-|shar|sie\-|sk\-0|sl45|slid|smb3|smt5|sp01|sph\-|spv\ |spv\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\-mo|t218|t250|t600|t610|t618|tcl\-|tdg\-|telm|tim\-|ts70|tsm\-|tsm3|tsm5|tx\-9|tagt|talk|teli|topl|tosh|up\.b|upg1|utst|v400|v750|veri|vk\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c\ |w3c\-|wapj|wapp|wapu|wapm|wig\ |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\-|your|zte\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\-|webc|whit|wmlb|xda\-) [NC,OR]
RewriteCond %{HTTP_ACCEPT} text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml [NC,OR]
RewriteCond %{HTTP:HTTP_X_WAP_PROFILE} .+ [OR]
RewriteCond %{HTTP:HTTP_PROFILE} .+ [OR]
RewriteCond %{HTTP:X-OperaMini-Features} .+ [OR]
RewriteCond %{HTTP:UA-pixels} .+

RewriteRule .* http://WEBSITE.COM [R=302,L]
Replace the WEBSITE.COM with the url you want to redirect mobile users to.
PHP and Java redirects can hurt your rankings on search engines.

EDIT:
You can also use Tera-WURFL. The WURFL Database API is a PHP & MySQL/MSSQL/MongoDB based library by ScientiaMobile that uses the Wireless Universal Resource File (WURFL) to detect the capabilities of mobile devices.
__________________

Last edited by Zeiss; 08-19-2012 at 12:42 PM..
Zeiss 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
Thread Tools




©2000-, AVN Media Network Inc



Powered by vBulletin
Copyright 2000- Jelsoft Enterprises Limited.