myip.dn42/wwwroot/api.php

19 lines
299 B
PHP
Raw Normal View History

<?php
include 'config.php';
$api_version = '1.0';
header('Content-Type: application/json');
$res = array(
'version' => $api_version,
'ip' => $_SERVER['REMOTE_ADDR'],
'node_id' => $node_id,
'node_location' => $node_location,
'node_asn' => $node_asn
);
echo json_encode($res);
?>