Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter URL's with regular expressions in php

Tags:

regex

php

What I'm trying to do is to block any kind of url and links posted on my site, The thing is that these people started posting these links like that for example:

W/W/W.DOMAIN.C/O/M
W//W//W//.DOMAIN.C//O//M

They are using many different variations, and I don't know what to do in order to block them all. Thank you

like image 492
Radicate Avatar asked Nov 05 '22 10:11

Radicate


1 Answers

You should consider using a spam-checking service like akismet and incorporate that into your site. It will help you catch spam like that.

This way, you wont have to struggle with regex.

like image 132
Jan Dragsbaek Avatar answered Nov 09 '22 08:11

Jan Dragsbaek