Skip to content

Instantly share code, notes, and snippets.

@timothycarambat
Last active April 28, 2019 00:53
Show Gist options
  • Save timothycarambat/104b30044af124027439099256be1754 to your computer and use it in GitHub Desktop.
Save timothycarambat/104b30044af124027439099256be1754 to your computer and use it in GitHub Desktop.
Public Function TINYURL_GENERATOR(base_url As String) As String
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 800
objIE.Height = 600
objIE.Visible = False
objIE.Navigate ("http://tinyurl.com/api-create.php?url=" + base_url)
Do
DoEvents
Loop Until objIE.readystate = 4
TINYURL_GENERATOR = objIE.document.getElementsByTagName("pre")(0).innerText
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment