This class (named Browscap) is a great alternative to PHP's native get_broswer function which requires manual regular updating of a browser.ini definitions file. Instead, Browscap intermittently imports the latest browser definitions from browserproject.com so that your scripts are always up to speed with the latest browser information.
Instructions and download below...
I've made a few edits to Jonathan's great class to make it a bit easier to implement. All you need to do is download the files below and add these two lines to your PHP script:
require("path/to/checkbroswer.php");
$browserInfo=checkbrowser(); //returns array of info on the browser (print_r($browserInfo) to view)
//alternatively, if you dont need all that array data:
$browser=checkbrowser('Browser'); //returns Case sensitive browser name (Firefox,Chrome,IE,etc)
$version=checkbrowser('Version'); //returns browser's version number (3.6, etc)
For details on what is returned in the array check out the Browscap website
» Download the modified Browscap file
NOTE: This is quite slow for one visitor every 10 days (which I can live with!) as it has to import the definitions file. Otherwise all data is cached and it should be nice and fast.
4 comments:
canada goose
coach factory outlet
coach outlet
ray ban sunglasses
fit flops
canada goose jackets
kate spade outlet
cheap oakleys
birkenstock sandals
birkenstocks
20161228caiyan]
\
ugg canada
discount oakley sunglasses
moncler outlet
coach outlet online
canada goose
canada goose outlet
cheap ray ban sunglasses
longchamp outlet
salvatore ferragamo shoes
coach outlet
adidas shoes
timberland boots
montblanc
converse shoes
nike mercurial
longchamp outlet
fendi
converse
coach outlet
lebron 11
longchamp bags
2018.6.28LINYING
michael kors outlet
rolex
mont blanc
armani handbags
goyard handbags
oakley sunglasses
lacoste jeans
ugg outlet
oakley sunglasses
nike store
2018.10.16chenlixiang
Post a Comment