What does Windows Phone 7 return on HTTP_USER_AGENT string in PHP?

In essence I detect cellular devices using the HTTP_USER_AGENT from the $_SERVER superglobal within PHP, but I have never found how to be able to detect Microsoft windows Phone 7 employing method.Can anyone tell me what’s given as soon as HTTP_USER_AGENT can be echoed whilst on a device managing Windows Cellphone 7 Thanks

This is the user gent regarding my Samsung Emphasis running Windows Phone SEVERAL:

Mozilla/4.0 (compatible; MSIE SEVERAL.0; Windows Phone OS 7.0; Trident/3.ONE PARTICULAR; IEMobile/7.0; SAMSUNG; SGH-i917)

Dear Joeyyy,

You will find there’s reason the reason http://www.search engines.com can be being put in place by default inside any web browser and aol has consumed its last place about search or almost every other kind associated with engines/websites.Yahoo continues to be big 9 typical, but google has overtaken everything and you need to obey.

I’ve seen for you to have published this requests here with regards to 2 hours ago, thats 120 units of holding out and bedding nails.It went on me about 1 subsequent to enter “HTTP_USER_AGENT in windows mobile phone 7” (copy& paste) along with about SEVERAL seconds to get the proper webpage that presented me with an authentic script(and answer to your question) that detects JUST ABOUT ANY mobile device through php.

Iam seriously glad this below that “answer” window is often a second container which bill is “What’s your source”.

Iam pretty pleased to stick a search engine link inside it.

WE <3 GOOGLE so should a person!


unction detect_mobile()


$mobile_browser = ‘0’;

if(preg_match(‘/(up.browserup.linkmmp strtolower($_SERVER’HTTP_USER_AGENT’))

if((isset($_SERVER’HTTP_ACCEPT’)) in addition to (strpos(strtolower($_SERVER’HTTP_ACCEPT! == false))



$mobile_ua = strtolower(substr($_SERVER’HTTP_USER_AG
$mobile_agents = array(
‘w3c NO, ‘acs-‘, ‘alav’, ‘alca’, ‘amoi’, ‘audi’, ‘av
‘blaz’, ‘brew’, ‘cell’, ‘cldc’, ‘cmd-‘, ‘dang
‘ipaq’, ‘java’, ‘jigs’, ‘kddi’, ‘keji’, ‘leno
‘maui’, ‘maxo’, ‘midp’, ‘mits’, ‘mmef’, ‘mobi
‘newt’, ‘noki’, ‘oper’, ‘palm’, ‘pana’, ‘pant
‘qwap’, ‘sage’, ‘sams’, ‘sany’, ‘sch-‘, ‘sec-
‘sie-‘, ‘siem’, ‘smal’, ‘smar’, ‘sony’, ‘sph-
‘tosh’, ‘tsm-‘, ‘upg1’, ‘upsi’, ‘vk-v’, ‘voda
‘wapr’, ‘webc’, ‘winw’, ‘winw’, ‘xda’, ‘xda-‘

if(in_array($mobile_ua, $mobile_agents))

if(strpos(strtolower($_SERVER’ALL_HTTP’ ‘operamini’)! == false)

// Pre-final examine to reset everything if the user will be on Windows
if(strpos(strtolower($_SERVER’HTTP_USER ‘windows’)! == false)

// Although WP7 is additionally Windows, which has a slightly distinct characteristic
if(strpos(strtolower($_SERVER’HTTP_USER ‘windows phone’)! == false)

returning true;
returning false;

Leave a Reply