views:

61

answers:

2

I sometimes see one or the other in my server logs.

Thank You

+1  A: 

The latter is invalid, and probably made-up by bot writer who wasn't sure what he's doing.

porneL
+2  A: 

The HTTP headers beginning with X are officious headers. They are not specified in the HTTP specification, but just coined by some 3rd party as kind of vendor-specific or "de facto" standard and taken over by many others, like HTTP X-Forwarded-For in case of proxy servers.

The particular HTTP X-User-Agent header is often inserted by some independent messenger between the actual client and the server, like a proxy, loadbalancer, transcoder, etc, but also some XMLHttpRequest based libraries. It often identifies the messenger itself. The User-Agent header should still represent the actual client. You also see this header sometimes in emails, this then represents the email program/software responsible for sending the mail.

That it is called HTTP_X_USER_AGENT (uppercased, HTTP prefix, underscores instead of hyphens) is PHP specific.

BalusC