mDecodeTinyURL

Ok this is a little function i wrote a while ago, it’s use it to decode TinyURL’s to their original so have fun with it.

‘—————————————————————————————
‘ Module : mDecodeTinyURL
‘ DateTime : 03.11.2009 02:46AM
‘ Author : Kreshnik Hasanaj
‘ Mail : kresha7@hotmail.com
‘ Purpose : Decode TinyURL to Original URL
‘—————————————————————————————
Option Explicit
Public Function DecodeTinyURL(TheURL As String) As String
Dim HTTP As Object
Dim StrOut As String
Dim sBuffer() As String

Const DecURL As String = “http://kiserai.net/turl.pl”

Set HTTP = CreateObject(“Winhttp.Winhttprequest.5.1”)

With HTTP
.Open “GET”, DecURL & “?input=” & TheURL & “&dec=Decode”
.Send
StrOut = .ResponseText
End With

sBuffer() = Split(StrOut, “”””)

DecodeTinyURL = sBuffer(5)

Erase sBuffer

End Function

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s