You want to generate content based on the capabilities of a user's browser.
Use the object returned by get_browser( ) to determine a browser's capabilities, as shown in Example 8-17.
Getting browser information
The get_browser( ) function examines the environment variable (set by the web server) and compares it to browsers listed in an external browser capability file. Due to licensing issues, PHP isn't distributed with a browser capability file. The "Obtaining PHP" section of the PHP FAQ (http://www.php.net/faq.obtaining) lists http://www.garykeith.com/browsers/downloads.asp as a source for a browser capability file. Download the php_browscap.ini file from that site.
Once you download a browser capability file, you need to tell PHP where to find it by setting the browscap configuration directive to the pathname of the file. If you use PHP as a CGI, set the directive in the php.ini file, as in Example 8-13.
Setting browscap in php.ini
8.5.4. See Also
Documentation on get_browser( ) at http://www.php.net/get-browser.