Compressing URLs to make them shorter

This one time, I thought maybe I’d try compressing URLs to make the query strings shorter.

At some point, I thought I might try to compress long URLs to make them shorter. Like if you had a web application that used very long query strings, you could turn the list of name=value pairs into one compressed string that you’d then pass as PATH data. Ie: a URL like http://yoursite.com/scriptname?name=value would become http://yoursite.com/scriptname/compressed_string Continue reading “Compressing URLs to make them shorter”

Creating a SELECT list of states with php

I’m posting this short chunk of php code that might save you a few minutes. It creates a list of US states in an HTML or XHTML SELECT list. Download the zip file here.

This is nothing big, but it might save someone 20 minutes worth of work. Basically, if you want to create a drop down list of US states using php you can include this code. Download the source here: states.zip (1.2K)

Here are a couple of examples of what this code does:


That’s all it does.