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
9e7c9a4f3f
commit
fd078bf31d
22
index.php
22
index.php
|
@ -246,10 +246,18 @@ function relay_mysql_query($params, $mysqli) {
|
|||
);
|
||||
}
|
||||
|
||||
function get_version() {
|
||||
function relay_get_version() {
|
||||
return array("version" => PHP_HTTPPROXY_VERSION);
|
||||
}
|
||||
|
||||
function relay_get_phpversion() {
|
||||
return array("phpversion" => phpversion());
|
||||
}
|
||||
|
||||
function relay_get_loaded_extensions() {
|
||||
return array("loaded_extensions" => get_loaded_extensions());
|
||||
}
|
||||
|
||||
function get_client_address() {
|
||||
$client_address = '';
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
|
@ -292,8 +300,16 @@ if ($context['jsonrpc'] == "2.0") {
|
|||
}
|
||||
break;
|
||||
|
||||
case "get_version":
|
||||
echo jsonrpc2_result_encode(get_version(), $context['id']);
|
||||
case "relay_get_version":
|
||||
echo jsonrpc2_result_encode(relay_get_version(), $context['id']);
|
||||
break;
|
||||
|
||||
case "relay_get_phpversion":
|
||||
echo jsonrpc2_result_encode(relay_get_phpversion(), $context['id']);
|
||||
break;
|
||||
|
||||
case "relay_get_loaded_extensions":
|
||||
echo jsonrpc2_result_encode(relay_get_loaded_extensions(), $context['id']);
|
||||
break;
|
||||
|
||||
case "get_client_address":
|
||||
|
|
Loading…
Reference in New Issue
Block a user