myip.dn42/wwwroot/api.php
Marek Küthe 69eabb70b8
create api, site and add security improvements to apache config
Signed-off-by: Marek Küthe <m.k@mk16.de>
2022-09-14 20:23:48 +02:00

18 lines
299 B
PHP

<?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);
?>