Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created December 3, 2015 21:53
Show Gist options
  • Save samueleresca/175704af95d697d8d1aa to your computer and use it in GitHub Desktop.
Save samueleresca/175704af95d697d8d1aa to your computer and use it in GitHub Desktop.
<?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);
print "<p>ID Stack:";
while ( $device != null ) {
print $device->id . "<br/>";
if (! $device->fallBack || $device->fallBack == "root") {
break;
}
$device = $wurflManager->getDevice ( $device->fallBack );
}
print "</p>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment