How do I get PHP to recognize a mobile device?

sophia_shapira

New member
I'm programming in PHP5. I wonder --- is there any way that a PHP script can be programmed so as to be able to recognize whether a browser accessing the script is from a mobile device (such as an iPhone, iPod Touch, blackberry, whatnot) or whether it is from a regular computer (such as a Macintosh, a Windows machine, or a Linux box)?

I ask this because I want to write a script that, in a certain way, will behave differently when encountering a mobile device than it does when encountering a regular computer.

BTW: Laptops, for purposes of this question, count as regular computers.
 
Back
Top