TeraWurfl
[ class tree: TeraWurfl ] [ index: TeraWurfl ] [ all elements ]

Source for file test_usage.php

Documentation is available at test_usage.php

  1. <?php
  2. /**
  3.  * Tera_WURFL - PHP MySQL driven WURFL
  4.  * 
  5.  * Tera-WURFL was written by Steve Kamerman, and is based on the
  6.  * Java WURFL Evolution package by Luca Passani and WURFL PHP Tools by Andrea Trassati.
  7.  * This version uses a MySQL database to store the entire WURFL file, multiple patch
  8.  * files, and a persistent caching mechanism to provide extreme performance increases.
  9.  * 
  10.  * @package TeraWurfl
  11.  * @author Steve Kamerman <stevekamerman AT gmail.com>
  12.  * @version Stable 2.1.3 $Date: 2010/09/18 15:43:21
  13.  * @license http://www.mozilla.org/MPL/ MPL Vesion 1.1
  14.  */
  15. // Include the Tera-WURFL file
  16. require_once realpath(dirname(__FILE__).'/TeraWurfl.php');
  17. // Instantiate the Tera-WURFL object
  18. $wurflObj new TeraWurfl();
  19. // Get the capabilities from the object
  20. $wurflObj->GetDeviceCapabilitiesFromAgent()//optionally pass the UA and HTTP_ACCEPT here
  21. // Print the capabilities array
  22. echo "<pre>".htmlspecialchars(var_export($wurflObj->capabilities,true))."</pre>";

Documentation generated on Sun, 19 Sep 2010 00:16:06 +0000 by phpDocumentor 1.4.3