本文整理汇总了PHP中webservice::CheckServerAPIKey方法的典型用法代码示例。如果您正苦于以下问题:PHP webservice::CheckServerAPIKey方法的具体用法?PHP webservice::CheckServerAPIKey怎么用?PHP webservice::CheckServerAPIKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webservice
的用法示例。
在下文中一共展示了webservice::CheckServerAPIKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: webservice
require_once 'dryden/loader.inc.php';
require_once 'cnf/db.php';
require_once 'inc/dbc.inc.php';
debug_phperrors::SetMode('dev');
if (file_exists('modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/webservice.ext.php')) {
include 'modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/controller.ext.php';
include 'modules/' . fs_protector::SanitiseFolderName($_GET['m']) . '/code/webservice.ext.php';
$api = new webservice();
if ($api->wsdataarray['request'] == '') {
$response_nomethod = new runtime_dataobject();
$response_nomethod->addItemValue('response', '1106');
$response_nomethod->addItemValue('content', 'No \'request\' method was recieved');
$api->SendResponse($response_nomethod->getDataObject());
die;
}
if ($api->CheckServerAPIKey()) {
if (method_exists($api, $api->wsdataarray['request'])) {
$api->SendResponse(call_user_func(array($api, '' . $api->wsdataarray['request'] . '')));
} else {
$response_nomethod = new runtime_dataobject();
$response_nomethod = new runtime_dataobject();
$response_nomethod->addItemValue('response', '1102');
$response_nomethod->addItemValue('content', 'Request not found');
$api->SendResponse($response_nomethod->getDataObject());
}
} else {
$response_nokey = new runtime_dataobject();
$response_nokey->addItemValue('response', '1103');
$response_nokey->addItemValue('content', 'Server API key authentication failed');
$api->SendResponse($response_nokey->getDataObject());
}