Skip to content

Instantly share code, notes, and snippets.

@40
Created March 28, 2013 00:02
Show Gist options
  • Save 40/5259304 to your computer and use it in GitHub Desktop.
Save 40/5259304 to your computer and use it in GitHub Desktop.
BB10 User Agent Detection php & js
// php
if(preg_match('/BB10|/i', $_SERVER['HTTP_USER_AGENT'])) {
echo 'You\'re on BlackBerry 10!';
}
// js
if(navigator.userAgent.match(/BB10/i)){
alert('BlackBerry 10!!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment