MarkGundy
MarkGundy

Reputation: 107

How to generate a tinyurl in Delphi

I have a chat program, written in Delphi 7, that I would like to replace long url's posted, with a smaller tinyurl as displayed. I've Googled but haven't found anything helpful quite yet.

Upvotes: 4

Views: 481

Answers (2)

You can use the Google Shortener API.

Using REST you can send a JSON value like this:

{"longUrl": "http://stackoverflow.com/"}

and the result looks like this:

{
"kind": "urlshortener#url",
"id": "http://goo.gl/lgNaMv",
"longUrl": "http://stackoverflow.com/"
}

You need implement authentification. Regards.

Upvotes: 1

Related Questions