如何防止网站上的垃圾邮件,如下图所示 [英] How to prevent spam on websites like shown in the following pictures
问题描述
最近,我发现许多垃圾邮件短语显示奇怪的文字行为,如下所示:
lately I have spotted many spam streads showing strange text behaviour like the following:
我试图理解这一点,但即使chromes工具也无济于事:
i tried to understand this but even chromes tools won't help much:
我有一些网站在线,想要实现更好的垃圾邮件保护客户端和服务器端需要知道什么检查在第一位。我需要知道这是如何完成的,也许如果它可以用正则表达式模式检测。
I have some websites online and want to implement a better spam protection client- and serverside but I need to know what to check in the first place. I need to know how this is done and maybe if it could be detected with a regex pattern.
任何帮助将不胜感激。
ps:我想写一个更好的标题,但我甚至不知道这个文本行为是如何调用的,我没有在google上找到任何东西
p.s.: I wanted to write a better headline but I don't even know how this text behaviour is called and I didn't find anything on google
推荐答案
这不是真正的垃圾邮件,它被称为 ZALGO 。在PHP中检测它有点棘手,请尝试下面的regexp:
It's not really SPAM, it's known as ZALGO. Detecting it in PHP is a bit tricky, try this regexp below:
if ( preg_match ( '/[^\x20-\x7E]/', $text ) || preg_match ( '/[^\x20-\x7E]/', $text ) ) {
die('ZALGO not allowed');
}
这篇关于如何防止网站上的垃圾邮件,如下图所示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!