防止推荐诈骗
如何防止“推荐诈骗”?
例如,在我的一个基于 WordPress 的网站中,我突然注意到有人点击了某个我从未听说过的网站的链接。当我点击链接时,显然没有指向我的网站的链接。该网站正在销售产品,在本例中是书籍。所有评论都遵循类似的语音模式,这些“评论”的每个所有者的网站 URL 都是该产品的 amazon.com 链接。
显然是一个骗局,我很快就退出了该网站。
有什么方法可以防止这些通过 PHP 伪造的推荐吗?
有什么方法可以判断它们是自动化的还是来自信誉良好的来源?
How can you prevent "referral scams"?
For example, in a wordpress-based site of mine, I suddenly noticed that someone clicked a link from some site I had never heard of. When I followed the link, there was obviously not a link to MY site. The site was selling products, in this case books. All comments followed a similar speech pattern, and the website URL for each owner of these "comments" was the amazon.com link to the product.
Obviously a scam, I quickly backed off the website.
Is there any way to prevent these forged referrals via PHP?
Some way of telling if they are automated or do not come from a reputable source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
作为答案,恐怕你不能。无法控制人们发送给您的推荐人内容。
您可以按照克里斯的建议来减少它。但通常来说,任何使用机器人故意创建此类垃圾邮件的人都会更改用户代理字符串。哎呀,我这样做是为了防止我后面的愚蠢防火墙阻止我使用 Firefox,因为我们知道 IE 有多安全。
因此,使用该技术只能阻止很小一部分。
要记住的重要一点是,任何人都可以伪造发送到您服务器的任何内容、表单值、http 标头、cookie 甚至 IP 地址,因此不要信任其中任何一个,也不必担心。
这不是您想要的答案,但不幸的是,这是唯一真正的答案。如果您确实必须这样做,那么您将获得引荐来源网址,抓取该页面,如果没有找到链接,则忽略它。但这是大量的工作,并且忽略了 javascript 创建的链接(来自广告等)。
有时,您仅仅因为损坏的浏览器或抓取软件甚至搜索机器人而得到了错误的引荐来源网址。
As an answer I am afraid you can't. There is no way to control what referrer people send to you.
You can reduce it by doing as Chris suggested. But as a rule anyone who uses a bot to deliberately create this type of spam will change the User-Agent string. Heck I do it to prevent the stupid firewall I am behind from preventing me using Firefox, because hey we know how safe IE is.
So using that technique will only stop a very small percentage.
The important thing to remember is anyone can fake anything sent to your server, form values, http headers, cookies even IP addresses, so don't trust any of it and don't worry about it.
Not the answer you wanted but unfortunately the only real answer. If you really really must, then you would get the referrer, scrape that page and if no link found ignore it. but thats a lot of work and ignores javascript created links (from ads etc).
Sometimes you get a bad referrer simply from a broken browser or scraping software or even a search bot.
根据您对服务器的控制程度,您可能会发现安装 mod_security(Apache 模块)很有用。
mod_security
充当 Apache 的防火墙,允许您阻止匹配(或不匹配)一组条件(包括用户代理、引用站点等)的请求。这是一篇博客文章,其中包含有关使用
mod_security
处理推荐垃圾邮件的信息:http://atomicplayboy.net/blog/2005 /01/30/mod 安全性简介/
Depending on how much control you have over the server, you might find it useful to install
mod_security
(Apache module).mod_security
acts as a firewall for Apache, allowing you to block requests that match (or do not match) a set of criteria (including user agent, referring site, etc.).Here is a blog post that has information on using
mod_security
to deal with referral spam:http://atomicplayboy.net/blog/2005/01/30/an-introduction-to-mod-security/
有一些方法可以防止这种情况发生,即使 12 年后这种情况仍然继续发生。奇怪的是,这是一段时间内为了提高排名而采取的真诚策略。人们会在 mediawiki 发布前两个月安装它,然后在发布时将其删除。缺点是该网站在受过教育的人看来似乎已受到损害。但受过教育的人不会点击垃圾邮件中的链接。
但是,是的,您需要一名主持人和/或一名批准者。带有队列的每日任务。
There are ways to prevent this, even 12 years later this continues to happen. Bizarrely this was a bona-fide tactic to improve rankings for some time. People would install mediawiki two moths before launch and them delete it at launch. The downside was that the site would appear to the educated to have been compromised. But the educated did not click links in spam.
But yes, you need a MODERATOR and/or an APPROVER. A daily task with a queue.