Código
<?php if ($iphone || $android || $palmpre || $ipod || $berry == true) { //OR echo "<script>window.location='http://mobile.site.com'</script>"; } ?>
Código
redirect }
Código
$mobile = 'http://mobile.mysite.com/'; } Code added to mobile page: function set_cookie () { document.cookie = 'mobilesitez=mobilesitez; domain=.mysite.com;'; window.location = 'http://www.mysite.com/' }
Código
<?php { } ?>
Código
if( preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|webos|galaxy|phone|pocket|psp|treo|android|mobile|240x320|400X240|nitro|nokia|portalmmm|proxinet|blackberry|palm||series40|series60|s60|sonyericsson|e10i|samsung|nexus|htc|desire|ipod|itunes|vodafone|wap-|wapi|wapa|wapp|series40|series60|s60|sonyericsson)/i', $user_agent) ){ //do something here for all mobile phones }
Código
$mobile_agents = '!(tablet|pad|mobile|phone|symbian|android|ipod|ios|blackberry|webos)!i'; { // Mobile! }
Código
$mobile = false; { $mobile_agents = '!(tablet|pad|mobile|phone|symbian|android|ipod|ios|blackberry|webos)!i'; { $mobile = true; } }