0

Turn Long URLs in to Short Ones with ShortURL

ColdFusion 8, ShortURL

I have just released a new project on RIAForge called ShortURL that utilizes the onMissingTemplate function of ColdFusion 8. The full project description:

Short URL takes any URL then creates a random 6 character string and adds .cfm to it. When the link is clicked on onMissingTemplate receieves the URL, looks up the full URL and forwards the user to the full URL. Very similar to tinyURL and other services except this is hosted on your domain.

Jason Delmore suggested a while back that more ColdFusion open-source projects should have an install file. I have taken an attempt at this so install.cfm creates a database table and alters a setting in the Application.cfc file. After downloading the project, unzip it and run install.cfm.

This is a first release so if you find any problems let me know (we have been using this at Interfolio for 6 weeks with no problems).

tags:
ShortURL
Nick Tong said:
 
Hey Sam, nice work. One thing that i think will really help is amking an API for it. I built on for this site: http://wapurl.co.uk/?page=api/overview, let me know if you want any help.
 
posted 711 days ago
Add Comment Reply to: this comment OR this thread
 
 
Nick -- Thanks. I've thought about an API but can not work out the use case. The main use for ShortURL that I envision is to change a really long URL that you are sending to a user into a short one. In those cases access to the CFC should do the trick. Can you see other cases?
 
posted 708 days ago
Add Comment Reply to: this comment OR this thread
 
Ted Dykstra said:
 
I found short urls to be very helpful. But http://www.qpyn.com is a site that I prefer. It's has many more features. Check it out if you get a chance.
 
posted 675 days ago
Add Comment Reply to: this comment OR this thread
 
Daniel said:
 
http://urlcover.com allows you to choose a custom tag for your short URL. It also has an API which you can use in your applications.
 
posted 479 days ago
Add Comment Reply to: this comment OR this thread
 
WOW gold said:
 
 
posted 213 days ago
Add Comment Reply to: this comment OR this thread
 
Dave said:
 
Looks great, Sam! I've found very little info on the web about writing a URL shortener in ColdFusion. I barely know my way around ColdFusion and we have one other guy who is a bit more experienced.

Has this script continued to work for you? Do you think we'd be able to modify it to allow for specific short URLS (if I want to use "gala09" or something else specific instead of a random string)?
 
posted 100 days ago
Add Comment Reply to: this comment OR this thread
 
steve said:
 
Nice work. I run a short url site http://ziprl.com this looks interesting
 
posted 96 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Twitter
You should follow me on Twitter here
About Me
I am a 34-year old Web Developer specializing in ColdFusion. I live and work in downtown Washington, DC with my wife and two daughters. Read more About Me

2007 CFeMmy Best Newcommer winner
As voted on by fellow CF Bloggers.
CFinNC - Carolina ColdFusion / Flex / Air Conference - Oct 17-18, 2009