php-mpos/public/include/pages/api.inc.php
Sebastian Grewe d492b532b7 Adding ability to disable the sites API functions
Addresses #467 and will fix upon merge.
2013-07-17 09:43:02 +02:00

15 lines
291 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Check if the API is activated
$api->isActive();
// Check for valid API key
$id = $user->checkApiKey($_REQUEST['api_key']);
header('HTTP/1.1 400 Bad Request');
die('400 Bad Request');
?>