In this new post to his blog Joshua Eichorn talks about a an automatic URL shortening service he has worked up, Su.pr, and how you can use their API to create shortened URLs for you own site.

Last week we launched our API which lets you integrate shorten and post functionality into any site or application. Today we are adding the ability to use your own domain for shortening. This lets you have urls like http://joshuaeichorn.com/9OPL so your readers can know what domain they are going too before they click on the link.

Using the API lets you set up, via a mod_rewrite (or any other URL rewriting tool) to match requests on your domain for a shortening code and make the call back to get the original URL as stored on the Su.pr service. You can find more details at this page on the StumbleUpon site.