如何阻止网站刮刮我的网站

时间:2011-12-10 10:48:45

标签: .htaccess web

我有这个歌曲网站,它所拥有的数据在其他网站上显示的内容 即使我回应“你好”在其他网站上做同样的事情,任何人都知道如何防止这种情况 只是深入了解我发现该网站正在使用file_get_contents()我怎么能阻止他这样做

3 个答案:

答案 0 :(得分:2)

好吧,你可以尝试确定他们的IP地址并阻止它

答案 1 :(得分:0)

或者您甚至可以为该爬虫生成垃圾信息,只是为了弄乱“克隆”网站。

要回答的第一个问题是:您是否确定了抓取工具从您的网站获取信息?

如果是这样,那么你可以给这个过程任何你想要的东西:没有(忽略/阻止),一条消息告诉业主停止获取你的信息,给他们回垃圾内容,......

无论如何,第一步是正确地做事。请确保您的网站上有一个“robots.txt”,其中包含已接受的抓取工具政策。

答案 2 :(得分:0)

您说正在使用file_get_contents。

A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide.

要停用它们,请在http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

了解更多信息

编辑:如果他们在此之后去使用CURL或等价物,请尝试通过更改HTML布局等来弄乱他们的脚本。如果这样做没有帮助,请尝试找到脚本主机的IP,然后制作它返回废话;)

Edit2:如果他们使用iframe,请使用javascript重定向iframe检测