Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は現在、自分のウェブページに zalgo テキストで「スパム」されており、zalgo が含まれているかどうかを確認する機能が必要です。
私はこのコードを見つけました:
if ( preg_match ( '/[^\x20-\x7E]/', $text ) || preg_match ( '/[^\x20-\x7E]/', $text ) ) { die('ZALGO not allowed');}
ただし、一部の合法的な投稿もブロックします。より良い方法はありますか?
ありがとう
通常、Zalgo は CC および CD ユニコードの範囲に分類されます。と照合してみてください/[\xCC\xCD]/。スパムを軽減するために、とにかく reCAPTCHA を用意する必要があります。ある日 4channers でなくても、次の日にはバイアグラ ボットになる可能性があります。
/[\xCC\xCD]/