mirror of
https://git.dn42.dev/lare/myip.dn42.git
synced 2024-10-24 03:11:33 +02:00
create api, site and add security improvements to apache config
Signed-off-by: Marek Küthe <m.k@mk16.de>
This commit is contained in:
parent
01af21f510
commit
69eabb70b8
9 changed files with 454 additions and 8 deletions
18
wwwroot/api.php
Normal file
18
wwwroot/api.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?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);
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue