美博园上网ip检测实用代码之二更详细

以前有朋友留言要美博园的上网ip检测代码,美博园有几种ip检测方式,前文公布了一种基本的检测ip方式 美博园上网ip检测实用代码之一 ,本文是美博园首页下方 美博园ip检测ipcheck 的代理ip查看代码,代理查看更详细,这些ip检测代码公布于此,供自己建立网页的朋友检测ip之用,代码如下:

<?php if ($_SERVER["HTTP_X_FORWARDED_FOR"] != "") {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
$proxy = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
} else {
$IP = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["REMOTE_ADDR"]);
} ?>
<?php echo("REMOTE_ADDR :&nbsp;&nbsp;&nbsp;" . $_SERVER['REMOTE_ADDR'] . "\n"); ?><br />
<?php echo("REMOTE_HOST :&nbsp;&nbsp;&nbsp;" . $_SERVER['REMOTE_HOST'] . "\n"); ?><br />
<?php echo("Server Host :&nbsp;&nbsp;&nbsp;" . $host . "\n"); ?><br />
<?php echo("Remote Port :&nbsp;&nbsp;&nbsp;" . $_SERVER["REMOTE_PORT"] . "\n"); ?><br />
<?php echo("Request Method :&nbsp;&nbsp;&nbsp;" . $_SERVER["REQUEST_METHOD"] . "\n"); ?><br />
<?php echo("Server Protocol :&nbsp;&nbsp;&nbsp;" . $_SERVER["SERVER_PROTOCOL"] . "\n"); ?><br />
<?php echo("HTTP_X_FORWARDED_FOR :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_X_FORWARDED_FOR'] . "\n"); ?><br />
<?php echo("HTTP_VIA :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_VIA'] . "\n"); ?><br />
<?php echo("HTTP_CLIENT_IP :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_CLIENT_IP'] . "\n"); ?><br />
<?php echo("HTTP_PROXY_CONNECTION :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_PROXY_CONNECTION'] . "\n"); ?><br />
<?php echo("FORWARDED_FOR :&nbsp;&nbsp;&nbsp;" . $_SERVER['FORWARDED_FOR'] . "\n"); ?><br />
<?php echo("X_FORWARDED_FOR :&nbsp;&nbsp;&nbsp;" . $_SERVER['X_FORWARDED_FOR'] . "\n"); ?><br />
<?php echo("X_HTTP_FORWARDED_FOR :&nbsp;&nbsp;&nbsp;" . $_SERVER['X_HTTP_FORWARDED_FOR'] . "\n"); ?><br />
<?php echo("HTTP_FORWARDED :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_FORWARDED'] . "\n"); ?><br />
<?php echo("HTTP_REFERER :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_REFERER'] . "\n"); ?><br />
<?php echo("HTTP_USER_AGENT :&nbsp;&nbsp;&nbsp;" . $_SERVER['HTTP_USER_AGENT'] . "\n"); ?><br /></p>

原文链接:https://allinfa.com/allinfa-ip-detection-code-part-two.html
原文标题:美博园上网ip检测实用代码之二更详细 - 美博园
本文 TinyURL 短网址: https://tinyurl.com/y2bxddld
本文 is.gd 短网址: https://is.gd/qdl1Fj
美博园文章均为“原创 - 首发”,请尊重辛劳撰写,转载请以上面完整链接注明来源!
软件版权归原作者!个别转载文,本站会注明为转载。

这里是你留言评论的地方


请留言


9 + 6 =
【您可以使用 Ctrl+Enter 快速发送】
Copyright © 2007 - 2021 , Design by 美博园. 版权所有. 若有版权问题请留言通知本站管理员. 【回到顶部】