More Twitter?

“Not again!” you all groan. Well, a couple of you.

I was thinking about URL shortening again, and then I realized that what everyone has been thinking about misses the mark just a little. Sure, you could set up something where you enter your site-admin or an FTP window or whatever, and then edit a file to include one more line, but the odds are it’s not you who’s going to use the service. What if you had a path to your shortening service (.com/shortener.php) that you could give a service like Twitter, and then Twitter could take your long URLs you enter from your mobile device while you’re somewhere doing something that leaves you in no mood to try hacking that into your website first.
What if you could just put into a box on your settings page, and if you happened to tweet a long string it would just use that service, instead of sending it to TinyURL?

If you put it in those terms, your requirements for your shortener change. It must accept a value from a site (probably as a POST variable), maybe check if it’s actually a URL, certainly check if it came from a list of allowed sites (you don’t want some random person throwing spam link into there, to use on other people), write that to an index, generate a new short URL, save that to the index, and then send the result back to the requesting site.

Then that site can put your shortened URL in place of the longer one, and you don’t have to worry about completely-ambiguous URLs; only mostly-ambiguous URLs.
It’ll give you the peace of mind that someone will at least know what site they’re going to, just by looking at the link.

As for the ‘how’: I’ll get to that later. I have to try some things out with PHP, first.

Tags: , ,

Leave a Reply