Category Archives: PHP

Excuse of the Day in the sidebar

You may have spotted the “Excuse of the Day” at the top of the left sidebar. This isn't a WordPress plugin as such, but a small bit of PHP in one of the theme files. If you want to use the same code, there are a couple of things you need to do.

1) In my case, I am concious of not wanting to abuse Eric's bandwidth, so I have set up a shell script via cron to wget the feed file once per day. I'd recommend this for another reason – if, due to unforseen circumstances, meyerweb is down, your code will still work on your local copy.
2) Edit your theme file in the appropriate place to include this block.

	

Technorati and Bad Behaviour

This blog is running Bad-Behaviour to try to limit spam and general naughtiness. It does it by header analysis on incoming requests, and it caches the results.

I noticed a couple of days ago that my Technorati pings were not updating on this site, and eventually narrowed it down to the fact that the Technorati Bot doesn’t send complete headers, so BB was blocking access to this valid source. Adding the technorati bot address to the whitelist file (as well as some other fiddling around that I’m not going to go into) means that the bot can now see the feed, and work with it correctly.

I hope this helps someone out there if they are having similar issues.