Captchas suck

So last time I mentioned the spam on the minipoll system. It only took another few hours after writing that blog post before I ended up putting a captcha on it!

I wouldn't have minded so much if it was good old fashioned spam but instead it was just lame random letters which means that someone was either out to annoy me, and succeeding mildly, or a person trying to point out that I needed security on the minipolls, which also succeeded slightly.

I would have been annoyed if I didn't like coding, but the fact is I do and I love a challenge. Especially an image based one like a captcha!

So after about twenty minutes of fiddling, testing and slight refining I came out with this:
Captcha image demo

I don't think it's too bad really. Needs some fine tuning as about 50% of the time it's unreadable to humans let alone bots. But I think the slightly blurry ditherd look is nifty.

You can check out the code for it over in the codebox: http://sandbox.palmnet.me.uk/testbox/codebox/index.php?module=snippet&id=90

Any ideas, suggestions on tweaking things like performance or ways to annoy spam bots more are always welcome in the comments.

And don't forget to see it in action over on the mini poll site




Tools! Yes, tasty tools! With snippets too

Well, I should be sleeping but instead I just had to code my latest in a whole series of Twitter tools!

Anyway, I've mentioned that I started a twitter thingy in PHP before, but since then it's now got themes, multi user support, last.fm integration....

Three flavours


Flavour 1
This is the basic one I made first.
It grabs the JSON Tweets from the Twitter API and uses them to put some basic Twitter info on an image, thus
Oooh, first version working!
It's also got basic colour themes! You can have it in basic grey, a nice shade of blue, red or even green. Wow!
And themes too

Flavour 2
This is the second edition.
The first one is HUGE, so this is more compact.
The fonts have to be jiggled about a bit to accommodate the smaller area better too, for example:
Back in black
However, this one also can grab the feed for you and your friends on Twitter, so if my Friend Wim posts a Tweet and it's more recent than one of my own, it'll show up if I use the friends command:
Showing t's post on microformat's feed
The above example shows microformat's feed, but a tweet from "t" because "t" is a friend of microformat and posted the most recent tweet.

Flavour 3
This is the third and so far final edition.
The first was cool, the second was neater, the third is basically the second, only this time it skips the whole multi-user approach and adds in a whole other site. Multi-site goodness!
So if you ever post a tweet that is similar to "listening to music" then it can grab the song you just listened to from your last.fm profile.
How cool is that!
Tweet that will trigger the last fm feed
Without giving it my lastfm ID
last.fm feed integration
Giving it my lastfm ID

Snippets!


I promised snippets, so here you are, but instead of snippets, hows about the full source? :D
Script 1
Script 2
Script 3

Live version


And here it is live.
Version 1:
Twitter feed image
Version 2:
Twitter feed image
Version 2 with friends:
Twitter feed image
Version 3 with last fm:
Twitter feed image


Page :  1