alfonso
Posts: 121
|
| Posted: 05/23/2006, 11:42 AM |
|
I have a guestbook that always is filled by spam (20 messages or more every day). I would like to delete the message that contain several words (I can't write this words here because don't appear my message) in a memo field. What can I write in before insert event or similar?
I have tried bloking by IP but everyday the IP is diferent.
Any idea?
I would like to do like this forum.
|
 |
 |
alfonso
Posts: 121
|
| Posted: 05/23/2006, 11:43 AM |
|
For example, in this forum I can't write the word se* because then the message don't appear. I need something like this
|
 |
 |
alfonso
Posts: 121
|
| Posted: 05/23/2006, 11:44 AM |
|
I would like to block othe words like viagr*,...
|
 |
 |
WKempees
|
| Posted: 05/23/2006, 3:08 PM |
|
Blocking spam:
build a table containing the words you want to block.
then use the content of that table to search through your text/memo field.
for instance:
Delete f'rom guestbook where memo like "%yourword%" // probably also "and
date_added ........."
This is the simple version targeted at MySQL.
You could do this in a function looping through your badwordtable and for
every word doing the delete.
"alfonso" <alfonso@forum.codecharge> schreef in bericht
news:64473578189bfd@news.codecharge.com...
>I have a guestbook that always is filled by spam (20 messages or more every
> day). I would like to delete the message that contain several words (I
> can't
> write this words here because don't appear my message) in a memo field.
> What
> can I write in before insert event or similar?
>
> I have tried bloking by IP but everyday the IP is diferent.
>
> Any idea?
>
> I would like to do like this forum.
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
WKempees
|
| Posted: 05/23/2006, 3:10 PM |
|
Another approach:
search Google for "CAPTCHA ASP"
|
|
|
 |
alfonso
Posts: 121
|
| Posted: 05/24/2006, 2:33 AM |
|
My problem is in ASP. I prefer to delete just before insert. If I write this:
Delete from guestbook where memo like "%yourword%", how analize all words of my bad words table?
|
 |
 |
alfonso
Posts: 121
|
| Posted: 05/24/2006, 2:50 AM |
|
If I write this:
if fldcomentarios="viagr" then
svisitas1Err = svisitas1Err & "No valido.<br>"
end if
is correct because don't let to write but it is OK if in comentarios is ONLY that word. How must I write to search in any part of the field
If I wrtie this:
if fldcomentarios like "%viagr%" then
svisitas1Err = svisitas1Err & "No valido.<br>"
end if
I got and error in this line.
|
 |
 |
WKempees
|
| Posted: 05/24/2006, 3:12 AM |
|
I gave you solution in SQL, you apparantly want to do it in ASP.
Sorry.
Cannot help you but if your coding is like :
Quote :
if fldcomentarios="viagr" then
svisitas1Err = svisitas1Err & "No valido.<br>"
end if
you need to figure out how to vary the "viagr"with the content of your
badname table.
Good luck.
|
|
|
 |