2. Function of this script

The scripts included in this article checks to see if the device is a handheld browser using $_SERVER["HTTP_USER_AGENT"], and works out the best type of data to send to it using $_SERVER["HTTP_ACCEPT"] values.