PHP: useragent string processing code?

Discuss Programming
Post Reply
Posts: 676
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia

PHP: useragent string processing code?

Post by X11 »

I am after a function to process useragent code, I could do this myself, however because useragent code varies and such, and there are shitloads of useragents, i thought there might be a better implementation out there somewhere.

Some examples would be nice, because then I can implement myself, I hope you/I can find somthing that will get the Operating System, Browser Name, and Browser Version.

Code: Select all

function ProcUseragent()
        global $UserOs, $UserBrwsr, $UserBrwsver
        // Some code here that does the work, needing research.

Getting the screen resolution could also be handy.

Any ideas/references?

Post Reply