Selling cookie info to third-parties is a classic example of you can make money without doing evil.
RSS

cgicomment-spam

2006/02/03 filed under /web

Lately, my blog has been suffering from comment spam and taking it out isn't too user friendly (you have to do quite some deleting work).

So I had two options. Make deleting spam easier, or stop spammers. And yes, the second options seems easier and more preferable.

After glancing at the code of CGIComment, I realized it was fairly easy to stop. All of the spam-comments so far were casino related, so all I had to do was add a little snippet of code to the SaveComment sub.

 # Spam protection
 if($CommentInfo{'text'} =~ /(casino|poker)/i) { 
    print "<h1>Nuh uh ... can't use the word: $1</h1>";
    warn($ENV{'REMOTE_ADDR'}, " abused $0 with '$1'");
    return; 
 }

The first line is a comment, so let's look at the second one. It checks whether the $CommentInfo{'text'} (the comment users post) contains either the word "casino" or "poker" (case insensitive).

If that is the case, the user will see the banned word, a warning will be printed to the error log showing the users' IP address and banned word. And of course, the entry will not be saved.

Easy hack, although I fear the banned list to grow soon (I bet the word "blogspot" will follow soon ;-)

Posted by: B10m | permanent link | comments (0)

cgicomment-spam

2006/02/03 filed under /nanoblogger

Lately, my blog has been suffering from comment spam and taking it out isn't too user friendly (you have to do quite some deleting work).

So I had two options. Make deleting spam easier, or stop spammers. And yes, the second options seems easier and more preferable.

After glancing at the code of CGIComment, I realized it was fairly easy to stop. All of the spam-comments so far were casino related, so all I had to do was add a little snippet of code to the SaveComment sub.

 # Spam protection
 if($CommentInfo{'text'} =~ /(casino|poker)/i) { 
    print "<h1>Nuh uh ... can't use the word: $1</h1>";
    warn($ENV{'REMOTE_ADDR'}, " abused $0 with '$1'");
    return; 
 }

The first line is a comment, so let's look at the second one. It checks whether the $CommentInfo{'text'} (the comment users post) contains either the word "casino" or "poker" (case insensitive).

If that is the case, the user will see the banned word, a warning will be printed to the error log showing the users' IP address and banned word. And of course, the entry will not be saved.

Easy hack, although I fear the banned list to grow soon (I bet the word "blogspot" will follow soon ;-)

Posted by: B10m | permanent link | comments (0)

amaroK and last.fm

2006/02/03 filed under /web

As usually, Bok, pushed me into the direction of a new website, Last.fm

The website is rather fun, especially if you want to expand your musical horizons a little. You can keep track of what music you're listening to, and based on that information, the site will recommend other bands/artists that you might enjoy.

This all is done through my xmms player. But, because my girlfriendfiancee also likes to listen to her music from my machine, I had to come up with a way not to mix my Hate Forest tracks with her Kelly Clarkson stuff, so I installed amaroK for her.

I must say I was pleasantly surprised to find out the many features amaroK has, actually turned out pretty well. The Album Cover Manager showed the right image for most albums, and the Dynamic Playlists turned out to be ok too. Last.fm support was already build in and to our great surprise, amaroK was able to show us the right lyrics to Indonesian songs.

The only downside is that I like the xmms interface better, but that's probably because I'm used to that for many years already.

Posted by: B10m | permanent link | comments (0)

amaroK and last.fm

2006/02/03 filed under /software

As usually, Bok, pushed me into the direction of a new website, Last.fm

The website is rather fun, especially if you want to expand your musical horizons a little. You can keep track of what music you're listening to, and based on that information, the site will recommend other bands/artists that you might enjoy.

This all is done through my xmms player. But, because my girlfriendfiancee also likes to listen to her music from my machine, I had to come up with a way not to mix my Hate Forest tracks with her Kelly Clarkson stuff, so I installed amaroK for her.

I must say I was pleasantly surprised to find out the many features amaroK has, actually turned out pretty well. The Album Cover Manager showed the right image for most albums, and the Dynamic Playlists turned out to be ok too. Last.fm support was already build in and to our great surprise, amaroK was able to show us the right lyrics to Indonesian songs.

The only downside is that I like the xmms interface better, but that's probably because I'm used to that for many years already.

Posted by: B10m | permanent link | comments (0)
return-member