【发布时间】:2019-07-27 19:28:18
【问题描述】:
我有一个 PHP 站点。 最近几周,我的网站从一个位置获得了大量自动点击。 这表明有人正在以自动方式“偷猎”内容,而不是通过适当的浏览器访问该站点。我想这是由 WGET(或 CURL 或其他)等工具/实用程序完成的。
有没有办法阻止这种自动访问?
为了进行调查,我尝试在雅虎、美国新闻和彭博等流行网站上使用 WGET,WGET 实用程序成功地从雅虎和美国新闻下载了页面(HTML 代码)。但是,在彭博示例页面上的类似尝试失败了。
我使用的命令:
wget64.exe https://www.bloomberg.com/research//stocks/snapshot/snapshot_article.asp?ticker=CWEN
保存的结果文件具有以下内容:
<h2 class="main__heading">We've detected unusual activity from your computer network</h2>
<p class="continue">To continue, please click the box below to let us know you're not a robot.</p>
<div id="px-captcha"></div>
</section>
<section class="box">
<section class="info">
<h3 class="info__heading">Why did this happen?</h3>
<p class="info__text">Please make sure your browser supports JavaScript and cookies and that you are not blocking them from loading. For more information you can review our <a class="info__link" href="/notices/tos">Terms of Service</a> and <a class="info__link" href="/notices/tos">Cookie Policy</a>
这表明至少彭博有办法阻止这种自动访问。 有谁知道网站管理员可以实施什么来防止这种自动访问(就像彭博社实施的那样)。
虽然我同意互联网上的访问应该是免费的,但有时需要设置一些界限以防止未经授权的访问。
【问题讨论】: