Re: S: function to remove & break URLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RalfGesellensetter wrote:
Dear list,

does anybody of you know these spammers filling up your guestbook with URLs? With strip_tags, I managed to remove the html tags. But what I want is this:

1. Detect such entries (to hide them by default)
2. Destroy URLs As for 2. I am thinking of adding spaces after at least every 12 characters (or even after every dot) - what do you recommend?
Just removing "http://"; still leaves the domain behind.

A good start could be to replace "." by ". " and "/" by " / ".
Guestbook spam (and comment spam) is something I'd like to try to eliminate altogether myself. I don't think there are any one-size-fits all solutions out there yet for detection/elimination. I'd personally like to hear any effective solutions people have found in PHP to combat this stuff.

In reference to the detection part; In my case, 95%+ of the spam entries have links that contain one of about 5 words (casino, pharm, drug, stock, or invest), so I could eliminate most spam by automatically trashing all entries that contains a link with one of those key words. I don't know if you're lucky enough to have spammers as predictable as mine, so that may not be an effective solution for anyone but me.

In terms of destroying URLs, what happens when a real guest wants to put a URL in their entry? Seems to me that you might be overshooting...

You might be better off finding some way of preventing the data from even entering the system, for example, a captcha type system. They have accessibility problems, but I've read about solutions that use simple JavaScript to automatically enter the captcha code into the correct field and hide the captcha and the field so that the whole process is transparent to the user (including users with screen readers), whereas if JS is disabled, the captcha is shown and the code must be entered. This is based on the assumption that current spam robots that don't incorporate a JavaScript execution engine. Not sure how effective it is, but it's an interesting idea.

Anyone want to share some spam-fighting success stories?

jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux