ip6.biz/src/proto.php

14 lines
218 B
PHP
Raw Normal View History

2021-05-02 20:43:48 +02:00
<?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));