mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 08:55:16 +00:00
Update index.php
This commit is contained in:
parent
38cced6090
commit
3c2d4b1845
|
@ -286,6 +286,11 @@ function relay_get_loaded_extensions() {
|
|||
return array("loaded_extensions" => get_loaded_extensions());
|
||||
}
|
||||
|
||||
function relay_dns_get_record($params) {
|
||||
$hostname = $params['hostname'];
|
||||
return dns_get_record($hostname);
|
||||
}
|
||||
|
||||
function relay_get_geolocation() {
|
||||
$url = "https://ipapi.co/json/";
|
||||
|
||||
|
@ -385,6 +390,10 @@ if ($context['jsonrpc'] == "2.0") {
|
|||
echo jsonrpc2_result_encode(relay_get_loaded_extensions(), $context['id']);
|
||||
break;
|
||||
|
||||
case "relay_dns_get_record":
|
||||
echo jsonrpc2_result_encode(relay_dns_get_record($context['params']), $context['id']);
|
||||
break;
|
||||
|
||||
case "relay_get_geolocation":
|
||||
$result = jsonrpc2_result_encode(relay_get_geolocation(), $context['id']);
|
||||
if ($result['success']) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user