/php-useragent

Analaysis client useragent string Or a given user agent string and get system and browser informations

Primary LanguagePHPCreative Commons Attribution Share Alike 4.0 InternationalCC-BY-SA-4.0

PHP-UserAgent

Screen Shoot

UserAgent Class Analayse client user agent string by default, or a given user agent string and gives you very helpfull information about user system and browser.

License

This Work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Link

Copyright

@author Ahmed Saad a7mad.sa3d.2014@gmail.com 2013-2016

Version

2.0.0

Updated

31 Jul 2016


Features:

  1. Get System and Browser Information about your Visitor as the following:
    1. Smart Phones Mobile Detecting.
    2. System Archetecture ( 32bit Or 64bit ).
    3. CPU Brand Detecting ( Intel, AMD, PPC ).
    4. Platform Detecting for Desktop OS and Smart Phone OS.
    5. Optimization : Client UserAgent Only Processed Once
    6. Read Only Access Properties .

Usage:

UserAgent Class Uses namespace, and autoload will automatically load class when called.

  • include or require user_agent.php file

       <?php
       	require_once('core/user_agent.php');
       	use Core\UserAgent;
       	$instance = new UserAgent();
    
  • just require or include Supplied autoload.php file which will load any class

       <?php
       	require_once('core/autoload.php');
       	use Core\UserAgent;
       	$instance = new UserAgent();
    
$instance = new UserAgent():
// Current Client Systen
$instance = new UserAgent();
// Custom UserAgent String
$instance = new UserAgent( 'custom user agent string here' );
$instance->string:

String useragent string .

$instance->systemString:

String system string .

$instance->browserName:

String Browser Name Google Chrome, Mozilla Firefox, Safari, Opera, Internet Explorer, Android Browser .

$instance->browserVersion:

String Browser Version .

$instance->osPlatform:

String OS Platform Name .

$instance->osVersion:

String OS Version .

$instance->osShortVersion:

String OS Short Version .

$instance->osArch:

String OS bit Architecture 32 OR 64 .

$instance->isIntel:

Boolean Detect if System CPU is Intel .

$instance->isAMD:

Boolean Detect if System CPU is AMD .

$instance->isPPC:

Boolean Detect if System CPU is PowerPC .

$instance->isMobile:

Boolean Detect if client device is Mobile Phone Or Tablet .

$instance->mobileName:

String Mobile Device Name .