Tinyurl API and Classic ASP

If you wanted to link to the tinyurl.com api in order to create tinyurl’s with ASP then here is the code I am successfully using with my ASP twitter updater.

Function GetTinyURL(url)

‘set the url
url=”http://tinyurl.com/api-create.php?url=” & url

Set GetConnection = CreateObject(“Microsoft.XMLHTTP”)
GetConnection.Open “get”, url, False
ResponsePage = GetConnection.responseText
Set GetConnection = Nothing


End Function

Response.write GetTinyURL(“https://www.craig-edmonds.com”)

Thats all there is too it!