gpt4 book ai didi

node.js request.js 为什么我的 IP 地址变了?

转载 作者:可可西里 更新时间:2023-11-01 16:34:26 25 4
gpt4 key购买 nike

只需向 whatismyip.org 发送一个简单的 GET 请求,我每次都会获得不同的 IP。如果它在我的浏览器中访问该网站,它总是一样的。这是怎么回事?我只是在我的 Windows 7 机器上本地运行 node.js。我怎么可能使用不同的 IP?

request('http://www.whatsmyip.org/', function (error, response, body) {
if (!error && response.statusCode == 200) {
res.render('index', {content:body;});
}
});

我觉得 http://www.whatsmyip.org 知道这是一个自动请求并且在欺骗我。 xD

最佳答案

阅读 IP 地址上方的 HTML 注释:

<!--
Please DO NOT program a bot to use this site to grab your IPs. It kills my server and thats not nice.
Just get some cheap or free web hosting and make your own IP-only page to power your bot.
Then you won't even have to parse any html, just load the IP directly - better for everyone!!
-->

关于node.js request.js 为什么我的 IP 地址变了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13328384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com