My IP, geo, request tools
My IP info, proxy headers
My IP, GEO info, country, city
My request $_SERVER vars
User-Agent tools
My User Agent information
Custom User Agent lookup
Email Address tools
Verify E-MAIL for exist
Trace E-MAIL sender location
Find E-MAIL box location
DNS and WHOIS tools
Find e-mail/domain MX
Domain lookup NS records
Domain A record Lookup
PTR lookup
Domain DNS Lookup
Domain WHOIS info Lookup
Advanced WHOIS Lookup Tool
Custom IP info, reverse lookup
IP info Lookup
Reverse Lookup
IP/Domain/Url Trace-Ping tools
Trace DOMAIN/IP
Online Ping
Check/Search Ports tools
Check PORTS for DOMAIN/IP
Search PORT description


User Agent detect,user agent browser,user agent request header

Related articles



User agent detect

The User-Agent header contains a line of text that can be used to identify a user agent and client device. Most of the time, we can find the device model and manufacturer from the User-Agent header. It may also contain information such as the client device's OS version, browser version, Java capabilities, etc.

Some example User-Agent headers are provided below.
Microsoft Internet Explorer 6:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Mozilla Firefox 1.0.7:

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

That is why for user agent detect using patterns libraries, for example [Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.*)*] - patern of "IEMobile", [* (compatible; Googlebot-Mobile/2.1; *http://www.google.com/bot.html)] - pattern of "Googlebot-Mobile browser", [AdsBot-Google (?http://www.google.com/adsbot.html)] pattern of "AdsBot-Google browser".

User agent browser

This application or script for information lookup. It is trivial enough to be translated in any language easily though. The first three methods are utilities, and the last two are the real detection: Browser and OS. The one in the middle is a helper to handle bots. In the code, some comments (in red) will guide you though the process.

The three methods returning a Browser/OS (the last three) actually return an array of three Strings, representing the element with three different levels of verbosity.

  1. The first element represent the class of the element (Win, Linux, MSIE, KHTML...)
  2. The second element represent the element reasonably detailed (Win98, WinXP, MSIE6, Gecko(Firebird)...)
  3. The last element represent element with all known details from the User-Agent (Linux2.4.24 i686, Windows NT 5.1, Gecko2005(Firebird0.8.0+), Opera7.23...), the only exception being Gecko for which I truncate the timestamp to the first four digits (the year) otherwise it gets unmanageable

User agent request header

User agent request header - it's part of request (request - information that sending to server [request method, url,...]), see example. Header can containg any string data, but as usualy it's looking like * (*) *.
HTTP_USER_AGENTMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19)
Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19
HTTP_ACCEPTtext/xml,application/xml,application/xhtml+xml,text/html;
q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_LANGUAGEen-us,en;q=0.5
HTTP_ACCEPT_ENCODINGgzip,deflate
HTTP_ACCEPT_CHARSETISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE300