I want to log the Majorn number of the Android version (first number) of a user. I'll use a PHP-script, but it don't work. The string stills empty. What do I wrong?
$txt = $_SERVER['HTTP_USER_AGENT'];
$reg = '/Android (\d+).(\d+)\s+/';
$a = array();
preg_match($reg, $txt, $a);
$str_version = $a[1];
Thanks in advance!