WebResourcesDepot |
Browser Detection With PHP – Browser.php Posted: 06 Jan 2011 12:42 AM PST Learning a user's browser and its version is usually very important to decide if any other scripts or styles need to be inserted into the web page. And, such tasks are usually accomplished with JavaScript as we don't need to go so deep (detecting if it is IE or not is generally enough). Browser.php is a very useful PHP class that helps collecting data about a visitor's browser including:
It can detect almost every popular browser including mobile + tablet devices and robots with a few lines just like: $browser = new Browser(); if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) { echo 'You have FireFox version 2 or greater'; } If the need for browser detection is more than just analyzing whether it is IE, Firefox, Chrome or Safari, then Browser.php is definitely a must-bookmark. Special Downloads: Advertisements: |
You are subscribed to email updates from WebResourcesDepot To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Comments (0)
Post a Comment