Home > parse_useragent

parse_useragent

Parse_useragent is a project mainly written in Ruby, it's free.

browser useragent parsing class

Simple browser Useragent parsing class

This is a simple class to parse useragent string based on PHP code from http://techpatterns.com/downloads/php_browser_detection.php . Some ideas of Safari detection were taken from http://github.com/kuccello/Spy-Vs-Spy

usage

require 'browsers.rb' info = Browsers.new('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.17') info.detect puts info.browsername puts info.browser_version

Previous:hyves