Skip to content

Instantly share code, notes, and snippets.

@jimmylatreille
Created January 29, 2014 20:04
Show Gist options
  • Save jimmylatreille/8695850 to your computer and use it in GitHub Desktop.
Save jimmylatreille/8695850 to your computer and use it in GitHub Desktop.
Pour detecter le mobile en PHP
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