/*
* An improved random palindrome generator viewable by WAP (and Web) capable devices
* Michael Sharon 2006
*
*/
//import the WURFL libraries
//require_once('/home/msharon/uberthings.com/palindromic/libs/wurfl/wurfl_config.php');
require_once('lib/wurfl/wurfl_config.php');
require_once(WURFL_CLASS_FILE);
// check for mobile device
// create a new WURFL object
$myDevice = new wurfl_class($wurfl, $wurfl_agents);
// Search the WURFL database using the USER_AGENT of the browser
$myDevice->GetDeviceCapabilitiesFromAgent($_SERVER["HTTP_USER_AGENT"]);
if ( $myDevice->browser_is_wap ) {
print "We found a mobile device! Huzzah!
"."Request URI = ".$_SERVER['REQUEST_URI'];
$_SESSION['is_wap'] = TRUE;
//echo "
"; //var_export($myDevice->capabilities); //echo ""; //redirect to the wap page header("Location: p.php"); } else { print "Just a normal web browser. Sniffles."; echo "
"; var_export($myDevice->capabilities); echo ""; } ?>