What Is My User-Agent?

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

Browser: Default Browser
Version: 0
Platform: unknown

 

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:

 

Bookmark or Share with Friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • StumbleUpon
  • del.icio.us
  • Sphinn
  • Digg
  • Reddit


Email This to a Friend Email This to a Friend

Print This Page Print This Page


Recent Comments

  • crazyleaf: This is one of the best plugins I have ever insta...
  • Patrick Hoss: i installed Spam Free 2 month ago and since then ...
  • Danny: Scott, this is one of the coolest plugins I have ...
  • Arkenor: I've seen that same Searchme comment on several b...
  • Mark Thompson: Hmmm this has got me thinking. I've noticed that ...
  • Scott Allen: Well, if you ask me for a link via email, I'd giv...
  • Stoney deGeyter: Ah, now we're getting closing to a workable defin...
  • Scott Allen: Yeah, not a fan of lawyers, politicians or Ben Af...
  • Stoney deGeyter: Good point about the direct/indirect damages. You...
  • Scott Allen: Quit spamming the blog, Stoney. :) JK! SUV's, ...

Monthly Archives