Shorten Long URLs

Search Search and do some more to find no easy way to shrink your links. Well here are some great link shortening methods.

1) You can do single URL one by one with Google by going to This one is awesome as you know it is from a reliable place and they also give a load of stats on how your url is doing.

2) You can find an API to do it. I have found this one was very easy by heyageek, done in javascript/JQuery .

3) If you wanta VB.NET way to do it then the code is below. You are simply doing a web request to and getting the response. This can be simply translated to C#, Javascript or any language you prefer.


(adsbygoogle = window.adsbygoogle || []).push({});


 Function ShortenLinks(ByVal LongLink As String) As String

Dim NewShortURL As String = ""


Dim rt As String = ""
Dim wRequest As WebRequest = Nothing
Dim wResponse As WebResponse = Nothing
Dim SR As StreamReader = Nothing

wRequest = WebRequest.Create("" & LongLink)
wResponse = wRequest.GetResponse

SR = New StreamReader(wResponse.GetResponseStream)
rt = SR.ReadToEnd

NewShortURL = rt

Catch ex As Exception
Response.Write(ex.Message & " // " & ex.StackTrace)
NewShortURL = ""
End Try

Return NewShortURL

End Function

Published by Chris Pateman - PR Coder

A Digital Technical Lead, constantly learning and sharing the knowledge journey.

Leave a message please

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: