PHP Classes

Patch to Google Chrome

Recommend this page to a friend!

      Browser Detect  >  All threads  >  Patch to Google Chrome  >  (Un) Subscribe thread alerts  
Subject:Patch to Google Chrome
Summary:isChrome() method
Messages:1
Author:Ivan Lira
Date:2009-02-02 01:50:00
 

  1. Patch to Google Chrome   Reply   Report abuse  
Picture of Ivan Lira Ivan Lira - 2009-02-02 01:50:00
Hello, thank you for this class, good job mf.
I seen in the published date, this class have some years withour update.

This is a little and single function patch to detect Google Chrome

include the function between other detector methods:

function isChrome()
{
if (eregi("chrome",$this->useragent))
{
$this->browsertype="Google Chrome";
return true;
}
else
return false;
}

and don't forget make the function call in whatBrowser() method.
IMPORTANT, write the isSafari() after, like this:
$this->isSafari();
$this->isChrome();

:-) questions: isvai@msn.com