php 获取用户ip与ie信息程序
function onlineip()
{
global $_server;
if(getenv('http_client_ip'))
{
$onlineip = getenv('http_client_ip');
}
elseif(getenv('http_x_forwarded_for'))
{
list($onlineip) = explode(',', getenv('http_x_forwarded_for'));
}
elseif(getenv('remote_addr'))
{
$onlineip = getenv('remote_addr');
}
else
{
$onlineip = $_server['remote_addr'];
}
return $onlineip;
}
function imgdecode($string)
{
global $_server;
$key = md5(onlineip().\t.$_server['http_user_agent']);
$coded = '';
$string = base64_decode($string);
$keylength = strlen($key);
for($i = 0; $i {
$coded .= substr($string, $i, $keylength) ^ $key;
}
return $coded;
}