Created
December 3, 2015 21:54
-
-
Save samueleresca/08de171405b8187639d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
require_once('wurflSetup.php'); | |
$wurflManager= getWurflManager(); | |
//SIMULO IPHONE 4 | |
$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7"; | |
$device= $wurflManager->getDeviceForHttpRequest($_SERVER); | |
$capability_groups= $wurflManager->getListOfGroups(); | |
asort($capability_groups); | |
foreach ($capability_groups as $group){ | |
//only output the capabilities of centrain group | |
if(in_array($group, array("ajax","css", "image_format"))){ | |
print "<strong>" . $group . "</strong>"."<br/>"; | |
print "<ul>"; | |
foreach ($wurflManager->getCapabilitiesNameForGroup($group) as $name){ | |
$c=$device->getCapability($name); | |
if($c=='false'){ | |
$c = "<li><span style='color: red; text-decoration: line-through'>"; | |
$c .= $name .'</span>'; | |
}else if($c== 'true'){ | |
$c = "<li><span style='color: green;'>✓"; | |
$c .= $name .'</span>'; | |
}else{ | |
$c= '<li>' . $name . ": <em>" . $c . "</em>"; | |
} | |
print $c; | |
print "</li>"; | |
} | |
print "</ul>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment