| 123456789101112131415161718192021222324 |
- <?php
- //session_start();
- header("Access-Control-Allow-Origin: *");
- header("Access-Control-Allow-Headers: authorization, cache-control, x-requested-with, rayid");
- header("Access-Control-Allow-Methods: *");
- header("Content-Type: application/json; charset=utf-8");
- require_once 'IIMTAPI.class.php';
- // Requests from the same server don't have a HTTP_ORIGIN header
- if (!array_key_exists('HTTP_ORIGIN', $_SERVER)) {
- $_SERVER['HTTP_ORIGIN'] = $_SERVER['SERVER_NAME'];
- }
- try {
- $API = new IIMTAPI($_REQUEST['request'], $_SERVER['HTTP_ORIGIN']);
- echo $API->process();
- }
- catch (Exception $e) {
- echo json_encode(Array('error' => $e->getMessage()));
- }
- ?>
|