Originally published on: Wed, 01 Jul 2009 01:38:18 +0000
Lately, I've read some complaints about URL shorteners ... sites that encode a URL into a shorter URL. The shortener web site keeps a record of the original URL and the smaller code that it has provided. All who navigate to the short URL are redirected to the original URL.
Unfortunately, as handy as these shorteners are, it's difficult to determine where one's browser might end up when clicking a link.
I wrote a small command-line C# program to accept a URL, retrieve the document, and display the final endpoint address. If the original URL had been redirected in any way, this displayed address would likely be different than the input address.
urlx.cs
As an example, the URL:
...is a link to my writeup on generating transparent, single-pixel GIF's for use in tracking the use of one's web site. By using the shortener service at http://bit.ly , and encoded redirector for my article URL becomes http://bit.ly/Rmncf .
To use my new urlx utility, I enter the following on the command-line:
urlx http://bit.ly/Rmncf
I see the output:
NOTE: I've added a GUI to urlx in a separate article. Please see http://www.mailsend-online.com/blog/?p=20
You may download the source and .NET 2.0 EXE for urlx here:
http://www.mailsend-online.com/wp/urlx.zip
Unless otherwise noted, all code and text entries are Copyright ©2009 by James K. Lawless
Views expressed in this blog are those of the author and do not necessary reflect those of the author's employer. Views expressed in the comments are those of the responding individual.

Save to StumbleUpon
Digg it
Save to Reddit
Share on Facebook
Share on Twitter
More bookmarks
Click **here**
A JavaScript REPL for Android Devices
A Review of Kevin Mitnick's Book Ghost in the Wires
Play MP3 Files with Python on Windows
Thwarting HTTP Referer Trackbacks
Screen Capture from Multiple Monitors in Java
A Data Manipulation Library for TAP
Scott Ballantyne: Blazin' Into Forth
Learning Z-80 Assembly Language on the TRS-80
Why Some Web Sites will go Dark on Jan 18th
Book Review : Paull Allen - Idea Man
A 90's Experiment in Online Systems - The U.S. West CommunityLink Service