Removing SPAM entries from phpbb
Posted: Mon Mar 27, 2006 10:20 am
[PROBLEM]
Just recently we had to forbid guest posting due to heavy spamming ... *sigh*
A major problem with those entries (>600 !!!) were that it would take AGES to delete them.
[SOLUTION]
Use some program to execute SQL queries (e.g. phpMyAdmin) and look for Anonymous entries, containing http:// links
You could add this line to limit the listing to start at a certain point in time:
(the number here is just some date I used)
Now you could use a subselect to remove all entries from "phpbb_posts" and "phpbb_posts_text" that contains a "post_id" showing up in this listing.
(Unfortunately subselects are only possible from MySQL >v4.1, so I've just created heavy inconistency in our board which I will fix as soon as I have time to)
Just recently we had to forbid guest posting due to heavy spamming ... *sigh*
A major problem with those entries (>600 !!!) were that it would take AGES to delete them.
[SOLUTION]
Use some program to execute SQL queries (e.g. phpMyAdmin) and look for Anonymous entries, containing http:// links
Code: Select all
select p.post_time, u.username, pt.post_subject, pt.post_text
from phpbb_posts p,
phpbb_posts_text pt,
phpbb_users u
where p.post_id=pt.post_id
and p.poster_id=u.user_id
and pt.post_text like '%http://%'
and u.user_id=-1
order by p.post_time;
You could add this line to limit the listing to start at a certain point in time:
Code: Select all
and p.post_time > 1140575047
Now you could use a subselect to remove all entries from "phpbb_posts" and "phpbb_posts_text" that contains a "post_id" showing up in this listing.
(Unfortunately subselects are only possible from MySQL >v4.1, so I've just created heavy inconistency in our board which I will fix as soon as I have time to)