Preamble
There is such an abbreviation of links http://g.ua, but, unfortunately, it does not have a public API, which is very desirable for use in its projects.
- It's a shame. - I thought, and I decided to write my abbreviation. Then, having thought well, I realized that there were so many of them. Why is another one needed? He just gets lost in this abundance.
In general, I made an API to it and put it on https://shrt.org.ua for all to see.
')
Plot
Screwing g.ua to my screenshot script for picpost.pp.ua I calmed down for several hours. In the evening, in a conversation with a friend, an absolutely idiotic thought occurred to me: “But should I fasten some more cutbacks there? It would be convenient to use one API to get short URLs without rewriting code. ”
Sowing for Sublime Text 2, I pretty quickly put on getting links with 5-7 shortening and outputting these URLs through 1 API.
In the end, I got what I wanted. But the mix of bash and PHP was haunted and the whole code was rewritten and ready to submit the project to the public. You look, and it is useful to someone.
Using
The default for reducing is g.ua:
http://shrt.org.ua/--?url=http://yandex.ru/
Use goo.gl to shorten the link:
http://shrt.org.ua/--?url=http://google.com&s=goo.gl
SSL is quite supported:
https://shrt.org.ua/--?url=http://rambler.ru&s=j.mp
Full list of supported shortcuts:
- g.ua
- clck.ru
- bit.ly
- j.mp
- bitly.com
- goo.gl
- slki.ru
- qps.ru
- loh.ru
- gltw.ru
- is.gd
- v.gd
- tinyurl.com
- b23.ru
- nn.nf
- tiny.cc
- yep.it
- 1url.com
- ur1.ca
- x.co
- qr.net
- z.te.ua
- choch.rf
- romb.su
- uri0.su
- trololo.org
- lin.io
There are a couple of link extenders:
- longurl.org
- unshort.ru
- untiny.me