create(true); // Obtain a WURFL device object by parsing the user agent string $device=$mgr->getDeviceForUserAgent($_SERVER['HTTP_USER_AGENT']); // Do we support JPEG? // Note - we have to test for the string values "true" and "false", not // the boolean values true and false. if ($device->getCapability('jpg')=="true") { echo "This device supports JPEG images."; } else { echo "This device does not support JPEG images."; } ?>