Skip to content

PHP User Agent Class to help you detect Browser, Device, OS, IP, GEO Location and more.

Notifications You must be signed in to change notification settings

tomslloyd/php-useragent-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

PHP User Agent Class

PHP User Agent Class, used for the following

  • Detect Browser and Version
  • Detect Device (mobile,tablet,desktop,bot)
  • Detect Operating System
  • User Host
  • User IP
  • Detect ISP (UK Only)
  • includes geoip fuctions (php_goip_exstention required and installed on server)

Usage

$UA = new UserAgent; 

echo $UA->IP(); // returns IP if detected
echo $UA->Browser(); // returns browser name ie Chrome if detected
echo $UA->OS(); // returns Operating System of Device if detected
if($UA->isMobile()){
 // if is mobile
}else{
 // if is not mobile
}

About

PHP User Agent Class to help you detect Browser, Device, OS, IP, GEO Location and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages