Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 761
MarkGundy Avatar asked Mar 01 '23 06:03

MarkGundy


2 Answers

Try http://www.scripting.com/stories/2007/06/27/tinyurlHasAnApi.html

like image 118
Matt Lacey Avatar answered Mar 02 '23 19:03

Matt Lacey


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.

like image 30
Germán Estévez -Neftalí- Avatar answered Mar 02 '23 20:03

Germán Estévez -Neftalí-