mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-07-15 08:48:08 +00:00
Update index.php
This commit is contained in:
parent
801f18fe25
commit
61851cd1b1
|
@ -370,8 +370,9 @@ function get_client_address() {
|
|||
$context = array();
|
||||
$rawdata = file_get_contents('php://input');
|
||||
$pos = strpos("<?xml", $rawdata);
|
||||
$xmlrpc_method = false;
|
||||
if ($pos !== false) {
|
||||
$context = xmlrpc_decode_request($rawdata, $method); // XML-RPC
|
||||
$context = xmlrpc_decode_request($rawdata, $xmlrpc_method); // XML-RPC
|
||||
} else {
|
||||
$context = json_decode($rawdata, true); // JSON-RPC 2
|
||||
}
|
||||
|
@ -450,8 +451,8 @@ if ($context['jsonrpc'] == "2.0") {
|
|||
|
||||
// check is it XML-RPC (stateless)
|
||||
// Use the target server as a simple CMS
|
||||
if (array_key_exists("methodCall", $context)) {
|
||||
$method = $context['methodName'];
|
||||
if ($xmlrpc_method) {
|
||||
$method = $xmlrpc_method;
|
||||
switch ($method) {
|
||||
case "metaWeblog.newPost":
|
||||
// todo
|
||||
|
|
Loading…
Reference in New Issue
Block a user