Created
January 29, 2014 20:04
-
-
Save jimmylatreille/8695850 to your computer and use it in GitHub Desktop.
Pour detecter le mobile en PHP
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
if(preg_match('/android|blackberry|htc|iphone|ipad|ipaq|ipod|mobile/', strtolower($_SERVER['HTTP_USER_AGENT']))) { | |
$ismobile = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment