14 lines
218 B
PHP
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));
|