Nazariy
Nazariy

Reputation: 6088

Good class to identify browser and OS

Is there any descent class that are capable to identify browser, its version and operating system?

I have tried default php function get_browser but results returned was wrong, it could not recognise non of my browsers (IE,Opera,Chrome,FF) except firefox but with wrong version.

Upvotes: 0

Views: 2263

Answers (2)

costamatrix
costamatrix

Reputation: 710

Browscap consumes excessive ammounts of memory on the webserver.... not an option for me.

Upvotes: 0

Michael Irigoyen
Michael Irigoyen

Reputation: 22957

Take a look at phpbrowscap: https://github.com/garetjax/phpbrowscap

Use it like this:

$bc = new Browscap('/path/to/temp/dir');
$current_browser = $bc->getBrowser();

echo "<pre>";
print_r($current_browser);
echo "</pre>";

Upvotes: 3

Related Questions