1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
// Check case?
$resp_headers = apache_response_headers();
if (!in_array('Access-Control-Allow-Origin', $resp_headers))
header('Access-Control-Allow-Origin: *');
if (!strcasecmp($_SERVER['REQUEST_METHOD'], 'OPTIONS'))
return;
require("../adei.php");
try {
ADEI::RequireService($_GET['service']);
} catch (ADEIException $ex) {
$ex->logInfo();
$service_error = xml_escape($ex->getInfo());
}
if ($service_error) {
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<result><Error>$service_error</Error></result>";
}
?>
|