Archive for the ‘tip’ Category

Send SMS notifications from your Web Application

Wednesday, November 26th, 2008

A few years ago I started using Clickatell as a way to send SMS messages from different applications I built. Getting a message to notify you of particular events (”you received an order”, “something isn’t working right”) allows you to respond in a timely manner.

I have one web-based application that monitors various websites I work on and I get a downtime notification via SMS any time a site is down. I have also integrated SMS with osCommerce to send order notifications including the contents of the order. This is great for monitoring a low volume sideline store. There are lots of applications for this of course.

I have used Aleksandar Markovic’s Clickatell SMS API for a number of years. It supports CURL and fopen for the HTTP request and is very easy to integrate into your application.

GZIP compression not supported by Wordpress 2.5+ (and what to do)

Tuesday, November 25th, 2008

I noticed that the GZIP compression option was no longer there in Wordpress after version 2.5. This is recommended to be performed by the server now using mod_deflate.

If you don’t have access to mod_deflate, i.e. if you are on a uncooperative shared host, you can use this method using .htaccess …
Speed Up Your Blog Using ZLIB

If that doesn’t work you may be on a phpSuExec server. Create a file called php.ini in the root of your Wordpress install with the following contents …

zlib.output_compression = On

You can test here:
http://www.gidnetwork.com/tools/gzip-test.php

Fast Prototype Primer

Friday, September 19th, 2008

A couple of links related to the Javascript library Prototype:
Quick Guide to Prototype
Developer Notes for prototype.js

Modifying Wordpress Rewrite Rules - small problem + solution

Wednesday, September 3rd, 2008

add_filter('rewrite_rules_array','yourawesomefunction');

I had to look at the Wordpress core code to work this out - thought I was going nuts. If you apply new rewrite rules using the rewrite_rules_array filter you need to ensure that you refresh the rewrite rules that Wordpress has stored in a hidden option. You do this by simply resaving the Permalink Structure under the Options menu in the admin area of your WP install.

Not immediately obvious that this would be required, but makes sense that they generate the rules and store them at this point.