donatj/PhpUserAgent

"Linux" but not "Android" on my milestone with android 2.1

enmaai opened this issue · 3 comments

@see title

Please elaborate with sample user agent strings and any other info you could provide

My UserAgentString is

Mozilla/5.0 (Linux; U; Android Itfunz2.1_Eclipse_Terminator_II_Final; zh-cn; Milestone Build/SHOLS_U2_02.36.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

umm.. Maybe I should buy an iPhone :)

$ret = parse_user_agent();
echo $ret['platform']; //"Linux" on my phone

I have done a fair deal of reworking of the regular expression and it appears to have corrected your issue!