function real_ip()
{
static $realip = NULL;
if ($realip !== NULL)
if (isset($_SERVER))
{
若(設定($_SERVER['HTTP_X_FORWARDED_FOR']))
$arr foreach ($arr $ip)
{
);
realip = $ip;
5;
}
elseif (isset($_SERVER['HTTP_CLIENT_IP']))
$realip = $_SERVER['HTTP_CLIENT_IP'];
}
else
{
@ else
{
$realip if (getenv(' HTTP_X_FORWARDED_ FOR'))
{
}
elseif ( getenv( 'HTTP_CLIENT_IP'))
{
$realip = getenv('HTTP_CLIENT {
$realip = getenv('REMOTE_ ADDR ');
]{7,15}/", $realip, $onlineip);
$realip = !empty($onlineip[0]) ? $onlineip[0] : '0.0.0.0';
return $realip;
}