ip6.biz/src/proto.php
2021-05-02 20:53:12 +02:00

14 lines
218 B
PHP

<?php
header('Content-Type: application/json');
$ip = $_SERVER['REMOTE_ADDR'];
$res = array();
if (strpos($ip, ':') !== false) {
$res["protocol"] = "6";
}
else {
$res["protocol"] = "4";
}
print(json_encode($res));