Sameer Borate's Blog: Detecting user agents in PHP

Courtesy PHPDeveloper.org  Wed, 10/07/2009 - 07:21

In a new post to his blog today Sameer looks at a trick or two about detecting the type of browser/client a visitor is using to view your website - one method with the superglobal and another with a helpful PEAR package.

Every time you use your browser to access a website a User-Agent header is sent to the respective server.

Detecting user agents on the server can be useful for many reasons: browser quirks, personalize content,...


 

More related items

Sameer Borate's Blog: Beautifying XML documents
On his blog today Sameer has a quick new tutorial looking at using the XML_Beautifier PEAR package to "pretty up" your XML documents. I use xmlPad to format and analyze xml documents, but...

Sameer Borate's Blog: Checking your site for...
Sameer Borate, in the wake of having security issues with his site, has posted a hint you could use to help detect when something has changed in important files in your application by...

Sameer Borate's Blog: Read the version of a PDF in PHP
Sameer Borate has a quick post to his blog today with some code that lets you read the version of a PDF document programmatically without a dependency on a PDF extension or library being...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com