PHP Classes

Sniff Response: Detect the browser type and capabilities category

Recommend this page to a friend!
  Info   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 745 This week: 1All time: 4,498 This week: 560Up
Version License Categories
sniffresponse 1.0GNU Lesser Genera...HTTP, PHP 5
Description 

Author

This class can be used to detect the user browser type and its category based on expected capabilities.

The class analyzes the user agent string and depending on the detected browser type it can assign to one of 4 groups: not OK, just OK, modern, and unknown. The browser name and version is also detected.

This class can help generating pages according to the detected browser capabilities, like for instance: outputting warnings, generating crude HTML that is browser independent, etc.

Picture of Grant Rodney Paton-Simpson
Name: Grant Rodney ... <contact>
Classes: 2 packages by
Country: New Zealand New Zealand
Age: 57
All time rank: 9838 in New Zealand New Zealand
Week rank: 411 Up4 in New Zealand New Zealand Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file banner.css Data CSS for phpDocumentor file
Accessible without login Image file bh_80x15.gif Icon image for example script
Accessible without login Plain text file browser_not_ok.php Example Example response
Plain text file class.SniffResponse.php Class PHP5 Class
Plain text file class.SniffResponse4.php Class PHP4 Class
Accessible without login HTML file SniffResponse4_phpDocumentor.html Doc. Detailed PHP4 documentation
Accessible without login HTML file SniffResponse_phpDocumentor.html Doc. Detailed PHP5 documentation
Accessible without login HTML file SniffResponse_User_Documentation.html Doc. Examples and Explanation
Accessible without login Plain text file stylesheet.css Data CSS for phpDocumentor file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:745
This week:1
All time:4,498
This week:560Up