php <xt:get_device_template/>
net3x How can I explore <xt:get_device_template/> with php if else statement.??
siva7170 » net3x [code] <?php $mobile_browser = '0'; if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i', strtolower($_SERVER['HTTP_USER_AGENT']))){ $mobile_browser++; } ...Continue reading »
net3x » siva7170 huaah.. too many long code. by the way, u cant follow my thread title.. I know a short PHP code to detect & redirect device. but I need more short toooo :)
{phani} » net3x Explore mean ??? what you want to do exactly ?? just getting the user device in php ???
net3x A short code that i use
[code]$ua = str_replace('windows ce', '', strtolower($_SERVER['HTTP_USER_AGENT'])); if ( !$ua || strpos($ua, 'windows') !== false || strpos($ua, 'linux') !== false || strpos($ua, 'bsd') !== false || strpos($ua, 'x11') !== false || strpos($ua, ...Continue reading »
« 1 2 »