Created
October 22, 2012 16:28
-
-
Save Abban/3932377 to your computer and use it in GitHub Desktop.
PHP function to check if the current user agent is IEMobile/9.0 device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Is Windows Mobile | |
* | |
* Check to see if the user agent is a Windows Mobile | |
* | |
* @return boolean | |
*/ | |
function is_windows_mobile(){ | |
return strstr($_SERVER['HTTP_USER_AGENT'], 'IEMobile/9.0'); | |
} | |
// Usage | |
if(is_windows_mobile()) echo 'Windows Mobile Sucks!'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment