News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DotVoid.com:
Parsing the user agent string using PHP
January 29, 2007 @ 15:11:57

On the Dotvoid.com blog today, there's a new post that shares some handy code to parse out information from the incoming user agent string for the visitors for your site.

Recently I experimented a bit with an Apache log file analyzer written in PHP. It's not all that difficult were it not for trying to parse the browser, or user agent, string. [...] For my purposes I don't care much for the operating system details. This is the result so far. I'm still not very satisfied but I thought maybe other people might be interested and maybe help out.

He provides the code in the format of an encapsulated PHP function that returns the product they're using, the version number of the browser and other various comments.

0 comments voice your opinion now!
parse user agent string regular expression string parse user agent string regular expression string


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: How Regular Are Your Expressions (The ABC's of PHP, Part 9)

David Coallier's Blog: PEAR now has User Notes/Comments

Zend Developer Zone: Work with XML Data in the Zend Framework

Davey Shafik's Blog: AJAX and PHP End-to-End Debugging

Hasin Hayder's Blog: Counting occurrence of a word in a String - Benchmarking of PHP functions


Community Events

Don't see your event here?
Let us know!


symfony2 extension library series community performance version release laravel api opinion example conference voicesoftheelephpant php7 interview framework podcast introduction xdebug

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework