• I’ve noticed in my Apache logs that almost ALL of my comment spam DOES NOT contain my site in the HTTP_REFERER. Legitimate comments always seem to. This makes sense to me, as someone would have to load my post page, then click on comment, so they should always have my site as the HTTP_REFERER. A quick test in wp_post_comments.php yields excellent results:
    add around line 49:

    if(!ereg(“mysite.com”, $_SERVER[‘HTTP_REFERER’])) {
    die(__(‘Error: Spam comments are not allowed here.’));
    }

    Does anyone know any reason why this won’t work long-term? I use Akismet and love it, but I still get 50+ comments per day. I suppose any server that didn’t have the HTTP_REFERER captured would break, but mine works fine.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Spam and HTTP_REFERER’ is closed to new replies.