Ejemplo n.º 1
0
try {
    $device_configuration = @file_get_contents($device_configuration_file_path);
    if (!$device_configuration) {
        throw new Exception("Device ({$device_configuration_name}) not supported");
    }
} catch (Exception $e) {
    echo $e->getMessage();
    exit;
}
// Substitute appid wherever /%applicaion%/ is present in device configuration
$device_configuration = preg_replace('/%application%/m', $application_id, $device_configuration);
// Decode to php object
$device_configuration_decoded = json_decode($device_configuration);
// PAGE GENERATION
// Set document mime type
header("Content-Type: " . $antie->getMimeType($device_configuration_decoded));
// Set doctype and opening html tag
echo $antie->getDocType($device_configuration_decoded);
echo $antie->getRootHtmlTag($device_configuration_decoded);
?>



<!-- HEAD -->

<head>
    <!-- Device specific head block (API loading etc) -->
<?php 
echo $antie->getDeviceHeaders($device_configuration_decoded);
?>