Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php $docroot = $_SERVER['DOCUMENT_ROOT']; // CORS // respond to preflights if ($_SERVER..
Decoded Output download
<?php
$docroot = $_SERVER['DOCUMENT_ROOT'];
// CORS
// respond to preflights
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
// return only the headers and not the content
// only allow CORS if we're doing a GET - i.e. no saving for now.
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']) && $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'GET') {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: X-Requested-With');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
}
exit;
}
require_once $docroot . "/vendor/Savant3.php";
require_once $docroot . "/ET_Client.php";
// Configuration for Savant
$savantConfig = array(
'template_path' => array( $docroot . '/views' )
);
$savant = new Savant3( $savantConfig );
?>
Did this file decode correctly?
Original Code
<?php
$docroot = $_SERVER['DOCUMENT_ROOT'];
// CORS
// respond to preflights
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
// return only the headers and not the content
// only allow CORS if we're doing a GET - i.e. no saving for now.
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']) && $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'GET') {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: X-Requested-With');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
}
exit;
}
require_once $docroot . "/vendor/Savant3.php";
require_once $docroot . "/ET_Client.php";
// Configuration for Savant
$savantConfig = array(
'template_path' => array( $docroot . '/views' )
);
$savant = new Savant3( $savantConfig );
?>
Function Calls
None |
Stats
MD5 | 41126cdcba5192781b1ac52cb64a8c65 |
Eval Count | 0 |
Decode Time | 125 ms |