Private

Ramin Hossaini's Blog

28Sep/09

Reducing spam even further in WordPress

Maybe I'm bored, but I've been spending a bit of time researching on ways to beat spam. Mind you, I haven't had anything get past Akismet anyway. This article is for all of you who want to be hardcore about your spam defences :)

I came across "Project Honey Pot", which is a distributed system for identifying spammers and the spambots. Simply said, IPs of your site's visitors are verified against the Project Honey Pot database and spammers are kicked out.

Participating in this network comes in 2 forms. You can either install a Honey Pot (which is pretty easy) or if you don't want to install a Honey Pot of your own, you can link to someone else's.

Installing Honey Pot on a server (optional)

Installing a Honey Pot is easy enough. Start out by visiting Project Honey Pot. Once you've signed up for an account, you can begin adding a Honey Pot:

honeypot1

Depending on your webserver's supported languages, you can choose from a bunch:

honeypot2

Once you've chosen your options, you can download the files and upload it to any accessible-directory on the site you specified. Just visit the site to activate it.

The next step, is to customize your blog or site in such a way that you can actually catch suspicious activity:

Plugin: WP-Honey Pot

In order to make use of your new Honey Pot (or a Honey Pot elsewhere), install WP-Honey Pot. WP-HoneyPot enables you to add a hidden link on your blog in one of several randomised locations to ensure that spammers are less able to adapt to the solution and once you are a contributing member to Project HoneyPot then you are able to use the http:BL (which I'll be getting to just now).

Once that's set up, you'll be doing your part in helping to catch email harversters, comment spammers and other suspicious folks.

Plugin: http:BL

The obvious next step, would be to block the spammers from your site. And that's where http:BL comes into the picture.

Once you've installed and activated the plugin, all you need to do is specify an API key (which you get from the Project Honey Pot site) and the URL to your Honey Pot of choice. And that's pretty much all there is to it.

This flow-chart sums up my Spam protection for the time-being:

spam_flow_chart

So far so good:

no-spam

If any of you have tried something similar, or tried what I described above, drop me a line below and let me know your experiences!

24Sep/09

How to get rid of your CAPTCHA and still avoid spam

CAPTCHAs. You hate them, I hate them. Everyone's seen them and everyone will tell you they're annoying.

captcha

I'll admit, I used to use a Maths CAPTCHA, cause I thought it'd be easier for someone to add 5 + 6 than to read some scew text-characters. Apparently this only annoyed people more though (there is an amazing aversion to Mathematics out there). I can't blame you, it really is annoying.

captcha2

And this one is very popular. Which apparently uses CAPTCHAs to help digitize books. That's great, but I don't feel like helping.

captcha3

Which all brings me to something I'd encourage more people to use.

Spambots fill up fields in a form and submit. If there's a CAPTCHA, advanced spambots actually solve it and enter a value. Which leads to more advanced (nastier-looking) CAPTCHAs.

Invisible Defender is an example of spam-protection that does things a little differently. Instead of displaying a CAPTCHA, it adds a bunch of generic fields to the form. These fields remain invisible/hidden from the typical user:

captcha4

(Most) Spambots don't realise this and fill up those fields too. The script detects if the fields were filled in and if they are, it shows an 403 error-page to the bots. I heard of this simple-concept about a year ago and thought it was such an eloquent solution. It almost seemed too simple to work.

Mind you, spambots are getting smarter, so some get past this too. But so far it's worked pretty well for me. I'm curious to know about your experiences too!

23Sep/09

Highlight comments by Blog-author (WordPress)

If you'd like to distinguish your own comments from the comments of your visitors, here's how to highlight your comments with just a line of CSS - no extra plugins or unnecessary code.

1
2
3
.bypostauthor { 
    background-color:#PLACE_YOUR_COLOUR_HERE !important; 
}

This works for WordPress versions 2.7+

25Feb/09

Force Firefox to spellcheck all fields

  • Go to about:config and heed the warning
  • search for layout.spellcheckDefault and set its value to 2
18Feb/09

Use Google Reader to find out rough estimate of RSS subscribers

RSS has been becoming an increasingly popular part of Web-based applications and services. For example, Flickr provides an RSS for your photo-stream and even a user's favourites.

Many webmasters will know just how useful FeedBurner can be to get an accurate picture of their subscribers. Using FeedBurner means that you'll have to display a specific-to-you FeedBurner address so that it can gather statistics (e.g. http://feeds2.feedburner.com/RaminHossaini) You can't really use FeedBurner though for services like Flickr, because you have no real control of what the RSS-feed-address displayed to users on your Flickr page is (unless of course, you're advertising your RSS feed on a website of your own). The "hack" described below could help:

First, start out by subscribing to the RSS feed:

greader1

Next, click on the feed to view it then click on the "show details" link in the top-right corner:

greader2

You can then see how many people are using Google Reader to subscribe to the RSS feed:

greader3

This would obviously only be part of your subscriber-base. If you're happy with just approximating it, have a look at how much of a market share Google Reader has (I've looked at a couple of statistics and it seems to be roughly 60% at the moment) and use that to calculate the unknown number of subscribers.

5Dec/08

Finding new photos on Flickr (almost effortlessly)

There are multiple ways of finding/exploring/discovering new great photos on Flickr - joining interesting groups, adding tons of contacts, or visiting Flickr-Explore.

I feel like Flickr-Explore has the same people in it all the time (with exceptions here-and-there). Basically, if you're a Flickr celebrity and have a couple thousand people following your photos, you stand a good chance of getting a photo of your "cute" cat or a "artistic" white-wall on Explore.

There are lots of little-known users that have great photos. One way I try to find these people is by looking at what people are "Fave"-ing. You can dig even deeper by picking a couple of those faves, then looking at their personal faves, and so-on.

While doing this the other day, I noticed that Flickr allows you to subscribe to someone's fave-feed. First browse to the user's favorites:

flickr_fav

Then click on the feed link below the faves:

flickr_fav_feed

Next, subscribe to the feed in an RSS reader (like Google Reader, Netvibes or Outlook)

add_subscription

If you subscribe to a couple of these feeds, you'll have other people doing the hard-work of finding photos for you. This works especially well if you subscribe to people that are on Flickr all the time, but Fave photos relatively selectively.

Yes, it is a lazy approach - but it's just another way of making the most out of Flickr.

4Dec/08

How to get a stuck-filter off a lens

I had circular-polarizer filter stuck on a lens recently (not sure how I managed to get it that tightly stuck either) and tried a bunch of different things to take it off - to no avail. It was considerably harder to take off because circular-polarizers have a top piece that is designed to turn.

One solution would have been to use a rubber-filter-wrench - but I couldn't find one. So I figured out the easiest solution was to use some masking-tape: Apply the masking-tape around the filter 2 or 3 times and make sure it's stuck-on really tight. Then twist - hopefully that should give yourself more surface-area to get it off.

Bear