The input is 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6.2 (KHTML, like Gecko) Safari/412.2.2'
Code: Select all
if ( preg_match("/Safari ([0-9]\.[0-9]{0,2})/i", $this->get_user_agent(), $found) &&
strstr($this->get_user_agent(), "Mozilla") )
{
$this->browser = "Safari " . $found[1];
}