Skip to content

Instantly share code, notes, and snippets.

@40
Created May 6, 2013 23:00
Show Gist options
  • Save 40/5528964 to your computer and use it in GitHub Desktop.
Save 40/5528964 to your computer and use it in GitHub Desktop.
detect BlackBerry 10 using php useragent
<?php
/**
* Mobile Browser Detection for PHP.
*/
$useragent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/BB10/i',$useragent))
{
echo 'BLACKBERRY 10, <br />';
echo $useragent;
}?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment