Reputation: 107
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
Reputation: 6848
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
Reputation: 65586
Try http://www.scripting.com/stories/2007/06/27/tinyurlHasAnApi.html
Upvotes: 7