Zend Certified Engineer

phpguru.org

Quality PHP and Javascript code
Download RGraph: HTML5 canvas graph library... Home ~ Downloads ~ FAQs ~ Licensing
RSS Feed RSS Feed
Follow me on Twitter Follow me on Twitter

Add to Google...

HTML5 & CSS3

Articles

Javascript

PHP5

PHP4






Bookmark with delicious tweet this site Post to Google Buzz! Stumble! this site

Browser Detection

If you ever wanted some browser detecion code, here it is. It works along the same lines as the Ultimate Javascript Client Side Detector, however it's server side. It doesn't pollute the global namespace, and it's very simple. Just include the code and call the function. Easy.

require_once('UserAgent.php');

$browser = GetUserAgent();

What does it detect? Well, Internet Explorer versions 4 thru 8, Firefox 1-3, Netscape Navigator 2 to 8, Opera 5 to 9, Konqueror, Windows (98, NT, XP, 2003, Vista), Macintosh (OS X), Linux ( *nix technically) and a few of the more common robots (eg. Google).

If you want to help out, simply visit this page which logs your browsers useragent string, and fill out the information. Cheers.

Download



RGraph: HTML5 canvas graph library

Example graph made using RGraph

If you're interested in web development, then you may also be interested in RGraph: HTML5 canvas graph library. It uses HTML5 features to produce a wide variety of graph types. Because it moves the creation of graphs from the server to the client, it can significantly reduce the load on your server and your bandwidth usage.