Nowadays we use different URL shortening services (like bit.lyTinyURLGoogle URL Shortener etc.) to shorten long URL to fit in micro-blogging sites (like Twitter), to beautify a link, view analytics on link clicks, make a link manageable for sharing (in SMS or printed hard copy, book, magazine etc.) or obscure the underlying address. But large portion of shortened links are used just to disguise spam or bad-sites containing malware, spyware, XSS attacks etc. So for safe browsing, sometimes revealing the destination of shortened link is necessary too. 

Here, we'll discuss one programmatic approach (using java.net.HttpURLConnection) to expand shortened links.

Tools and Technologies used in this article :

  1. Eclipse Kepler 4.3.1

  2. JDK 1.6

Continue Reading -->