<html>
<head>
<style>
body{margin:0;padding:0;color:white;background-color:transparent;font-size:11px;text-align:center;}
span{font-size:1.1em;}
</style>
</head>
<body>
<span>
<?php
$myIP = $_GET['myNicIP']; $vers = $_GET['ver'];
if ($_SERVER['HTTP_X_FORWARDED_FOR']) { 
  $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 
}
else { 
  $ip = $_SERVER['REMOTE_ADDR']; 
}
if ($vers=="v1") {
  if ($myIP==$ip) { echo "Direct connection"; }
  else { echo  $ip; }
}
if ($vers=="v2") {
  echo $ip;
}
?>
</span>
</body>
</html>