Serendipity

From LinuxReviews
Jump to navigationJump to search

Serendipity is a user-friendly popular PHP blog

Comment spam

Insert this at the beginning of comment.php to prevent anyone from spamming your blog without being referred from the blog (this prevents spamming from third party URLs and automated software).

 $referrer = parse_url( $_SERVER[ "HTTP_REFERER" ] );
 if ( $referrer[ "host" ] != $_SERVER["HTTP_HOST"] ) {
 echo "Don't post from another server!";
 exit();
 }

External links