Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you get the Browser information?

Answer Posted / ravi rajendra k

If you need a parser for getting OS, browser name and version details, use this pattern in a preg_match_all function.

$pattern = '#(?<browser>' . join('|', $known) .')[/ ]+(?<version>[0-9]+(?:\.[0-9]+)?)#i';

You can see my article www.peacemax.com/11/php/user-agents-php-snippet where i wrote the entire function for getting those details.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between php4 and php5?

1006


Why do you need to filter out empty files?

873


What is the use of Php variables?

1033


Can we extend two classes in php?

985


Why do we use session?

960


What is the function func_num_args() used for?

912


How to concatenate two strings in php?

1006


When do sessions end?

897


Why does php start with variables?

964


What is meant by PEAR in PHP?

922


What does session start do in php?

912


Why is php used for web development?

916


What is rest api in php?

900


What are default session time and path?

1052


Why do we use htaccess

1026