What Is My User-Agent?

 
Details of Your Browser:

Your User-Agent is:
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)

No data available.  

How Do I Detect My User-Agent?
Here’s how to detect your User-Agent, in PHP, ASP, and JavaScript.

PHP:
<?php
$MyUserAgent = $_SERVER['HTTP_USER_AGENT'];
echo "Your User-Agent is: $MyUserAgent";
?>

ASP:
<% @ Language=VBScript %>
<%
MyUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
%>
Your User-Agent is: <%=MyUserAgent%>

JavaScript:
<script language="JavaScript">
MyUserAgent = navigator.userAgent;
document.write('Your User-Agent is: ',MyUserAgent);
</script>

Security Note:
You will want to add code to sanitize output to eliminate XSS exploits.

Detailed Browser Detection:

More on User-Agents:

Hostgator Web Hosting Affordable Fast Reliable Servers: What Is My User Agent? Uncategorized

Bookmark, Share and Enjoy:
  • Twitter
  • Sphinn
  • StumbleUpon
  • Facebook
  • del.icio.us
  • LinkedIn
  • Google Bookmarks
  • E-mail this story to a friend!
  • Print this article!