mohamad mohamad mohamad mohamad - 2 months ago 7
MySQL Question

Browser detection give me a fatal error

I'm using this class to get browser detection name of browser and the version and the platform version name and if is a phone or other

https://github.com/Wolfcast/BrowserDetection

and this is the code

require_once('BrowserDetection.php');
$browser = new BrowserDetection();print($browser);
echo 'You are using ', $browser->getBrowser(), ' version ', $browser->getVersion();// line 79


but it give me a fatal error


Fatal error: Call to undefined method BrowserDetection::getBrowser()
in C:\wamp\www\order\main.php on line 79


i want to get this information and stored in my mysql database

How to solve this problem ?

Answer

From the source:

* 2016-02-11: Version 2.3.0
*  + WARNING! Breaking change: public method getBrowser() is renamed to getName().

So you should use getName() method instead