//开源代码
함수 getip(){
if (getenv("http_client_ip") && strcasecmp(getenv("http_client_ip") , "알 수 없음"))
$ip = getenv("http_client_ip"); //开源
else if (getenv("http_x_forwarded_for") && strcasecmp(getenv("http_x_forwarded_for"), "unknown"))
$ip = getenv("http_x_forwarded_for "); //
else if (getenv("remote_addr") && strcasecmp(getenv("remote_addr"), "unknown"))
$ip = getenv("remote_addr");
else if (isset($_server[@#remote_addr@#]) && $_server[@#remote_addr@#] && strcasecmp($_server[@#remote_addr@#], "알 수 없음"))
//
$ip = $_server[@#remote_addr@#];
그 외
$ip = "알 수 없음";
반품($ip);
}
?>
判断邮箱地址
checkemail($inaddress) 기능
{
return(ereg("^([a-za-z0-9_-])+@([a-za -z0-9_-])+(.[a-za-z0-9_-])+",$inaaddress));
} //phpfensi.com
?>
함수 getip() { //获取ip
if ($_server["http_x_forwarded_for"])
$ip = $_server["http_x_forwarded_for"]; //
else if ($_server["http_client_ip"])
$ip = $_server["http_client_ip"];
else if ($_server["remote_addr"])
$ip = $_server["remote_addr"]; //
else if (getenv("http_x_forwarded_for"))
$ip = getenv("http_x_forwarded_for");
else if (getenv("http_client_ip"))
$ip = getenv("http_client_ip"); //
else if (getenv("remote_addr"))
$ip = getenv("remote_addr");
else
$ip = "알 수 없음";
$ip를 반환합니다.
}
?>