Jump to content

Spammer


dweb

Recommended Posts

Hi

 

Im working if someone can help me.

 

I have a small form on my website which saves the data to a sql database.

 

It seems like someone has been spamming it

 

I need to write a query or script to try and pickup these spam entries, can someone advise me

 

They seem to have used the format

 

{letter} {word} {6digit number} {@ domain}

 

for example

 

[email protected]

 

[email protected]

 

[email protected]

 

I believe these are spams as I have around 15,000 entries in this exact format

 

I have since added something to stop these spammers, but I want to clean up all the old spam entries

 

Thanks very much

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/262135-spammer/
Share on other sites

The WHERE clause below should capture what you are looking for.  Use it as the SELECT first to see if it hits everything that you want it to and nothing more, and then you can throw it onto a DELETE.

 

SELECT * FROM `emailtest` WHERE emailaddress REGEXP '[a-z]\.[a-z]+[0-9]{6}@.*'

 

~awjudd

Link to comment
https://forums.phpfreaks.com/topic/262135-spammer/#findComment-1343393
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.