All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
php程序获得访问者ip的代码_[PHP教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/2/17 7:38:57 Browse times: 405 Comment times: 0

php程序获得访问者ip的代码_[PHP教程]


Head photo

Go homepage
Upload pictures
Write articles

php程序获得访问者ip的代码_[PHP教程]


if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
{
$realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
}
elseif (isset($_SERVER["HTTP_CLIENT_IP"]))
{
$realip = $_SERVER["HTTP_CLIENT_IP"];
}
else
{
$realip = $_SERVER["REMOTE_ADDR"];
}





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.