PHP Classes

userStack: Analyze the user browser using the userStack API

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 71 All time: 10,246 This week: 673Up
Version License PHP version Categories
userstack 1.0.0GNU General Publi...5HTTP, PHP 5, User Management


This class analyzes the user browser using the userStack API.

It can take the current user browser string identifier and sends a HTTP request to the userStack API Web server so their Web service can analyze it and return the results.

Currently it can return details like the user browser name, device type or user computer operating system.

Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 59
All time rank: 608 in United States United States
Week rank: 16 Up2 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

Winner: 7x


example usage
userStack ver 1.0

You must get an API key from
and enter it in the userstack.class.php file

//turning off low level notices
error_reporting(E_ALL ^ E_NOTICE);

//instantiate the class
$userStack = new userStack();

//set the user agent to be checked

//get the response from the api

//the response property will contain the response returned from the api
echo '<h4>API response for user agent: '.$ua.'</h4>';
'Operating System: '.$userStack->response->os->name.'<br>';
'Device: '.$userStack->response->device->type.'<br>';
'Browser: '.$userStack->response->browser->name.'<br>';

//full response
echo '<hr>';
'<h4>Full response</h4>';


  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example Usage
Accessible without login Plain text file license.txt Lic. License
Plain text file userstack.class.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,246
This week:673Up