便捷的IP检测技巧

in #cn5 years ago


有时为了提高效率,我们需要掌握一些小技巧,本文讲述的就是,如何做便捷的IP检测。

当我们通过代理进行网络连接的时候,可能代理的质量不好,或者链路情况不好,导致的网速偏慢,这时候我们默认的打开浏览器的在线IP检测页面就会受到影响。

那么,可以在本地建一个html文件,代码内容如下:

<html>
<head>
<title>IP Lookup</title>
</head>
<body>
<center><script type="text/javascript" src="http://api.geoipview.com/api.php?t=0&;amp;lang=en&amp;w=360&amp;h=104&amp;bg=ECDDC0&amp;bd=8DADCC&amp;tx=222222"></script></center>
</body>
</html>

即可便捷的检测IP是否变换,以及可以看到IP所属国和城市,由于文件在本地,而且尽量减少在线监测网站的广告和其他多余东西的影响,这样的打开速度较快。

具体操作,见下图:

宝塔界面列表

我没有使用静态网页编辑工具(像DW),我直接在 宝塔面板-文件 里,在某个站点文件根目录下直接创建的这个html文件,

 

宝塔面板新建文件

点击 新建-新建空白文件,

命名文件名称

命名文件名称,需要注意的是,一定记得文件名是要包含.html这个后缀的。

复制代码并保存

将上面的代码复制进空白html文件中,并保存。

至此,这个文件就创建完毕了。因为这个文件在我某个网站文件根目录下,我可以直接输入http://mysite.com/ip_lookup.html来查看效果。

也可以在宝塔面板的文件管理页面,将这个html文件下载到本地进行保存,需要用时直接点击打开。

下载html文件

而这个IP查询效果如下图所示,

代码效果

 

 


Posted from my blog with SteemPress : https://chakela.me/convenient-ip-detection-skills/

Sort:  

感谢代理50.23SP 给team-cn! 由于你使用CN作为你的首标签,额外获得2%点赞! 你的帖子获得team-cn 8% 点赞!(如果不想看到这个回复,请回复“取消”)

Congratulations @andyhsia! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You distributed more than 1500 upvotes. Your next target is to reach 1750 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @andyhsia! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Valentine's day challenge - Give a badge to your beloved!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @andyhsia! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You distributed more than 3000 upvotes. Your next target is to reach 4000 upvotes.

You can view your badges on your board and compare to others on the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @hivebuzz:

The Hive Gamification Proposal
Support the HiveBuzz project. Vote for our proposal!