萝卜头IT论坛

搜索
查看: 2343|回复: 0
收起左侧

[水] PHP获取访问者IP

[复制链接]
发表于 2013-5-29 21:01:45 | 显示全部楼层 |阅读模式

  1. <?php
  2. header('Content-Type:text/html;charset=utf-8');
  3. ?>
  4. <html>
  5. <head>
  6. <title>PHP测试</title>
  7. </head>
  8. <body>
  9. <?php
  10. $ip=$_SERVER['REMOTE_ADDR'];
  11. echo "你的IP是:".$ip."     <a href="http://www.cz88.net/ip/?ip=".$ip.""target="_blank">查询IP归属地</a>";
  12. ?>
  13. </body>
  14. </html>
复制代码


回复

使用道具 举报

联系我们(Contact)|手机版|萝卜头IT论坛 ( 苏ICP备15050961号-1 )

GMT+8, 2024-5-17 17:30 , Processed in 0.111154 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表