Menu

#5 Update for Intel-based macs

open
nobody
None
5
2006-11-20
2006-11-20
Jon Koerber
No

phpSniff does not correctly identify the new Intel-based macs which have a different identification in the HTTP_USER_AGENT system variable.

In the file phpSniff.core.php...

Update the regex string on line 243 from:
$regex_mac = '/(68[k0]{1,3})|(ppc mac os x)|([p\S]{1,5}pc)|(darwin)/i';

To:
$regex_mac = '/(68[k0]{1,3})|(Macintosh)|(ppc mac os x)|([p\S]{1,5}pc)|(darwin)/i';

Adding the full string option for "(Macintosh)" correctly identifies Intel-based Macs.

Thanks

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.