browser detecter

By bangas on Oct 02, 2005

Very simple code that Displays the HTTP_USER_AGENT of the client.

$useragent = $_SERVER ['HTTP_USER_AGENT'];
 echo "<b>Your User Agent is</b>: " . $useragent; 


Sign in to comment.
log2   -  Jul 30, 2006

Also you could have put this in a form that the user can read, example, Internet Explorer 6, or FireFox. Because not everyone know how to read things like: Mozilla/4.0 (Compatible, MSIE/4, Windows NT 5.1)

Hawkee   -  Oct 02, 2005

You can take this a step further to make it detect Googlebot, Yahoo! Slurp or msnbot. This would be useful for blocking the Search Engine bots from clicking particular links on your site.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.