-
-
Save MikeRogers0/2907534 to your computer and use it in GitHub Desktop.
<?php | |
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/'); | |
/* For example | |
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/ | |
Would return: | |
http://tinyurl.com/d4px9f | |
*/ | |
?> |
Wow very powerful, nice!
Works! I’m personally going to use it in Shortcuts
Superb, thanks for sharing..
thank you so much the most powerful one liner api I have ever used.
You can use with alias (nice key) also.
Ex: https://tinyurl.com/api-create.php?url=https://drivebird.com&alias=newdrivebird
Please note the alias must be available in their database as well as minimum 5 character long.
The best solution, thank you so much
Does anybody know if tinyurl.com enforces any rate limits or throttling on this endpoint?
it is not working for me also giving 'Error' for custom alias
it is not working for me also giving 'Error' for custom alias
That could be because you are using a custom alias that is already in use. Try a different custom alias.
Hi ,it is working for me tested 10 dynamic url .Shall we use this for 1 lakh to generate dynamic url and has tinyurl officially announced API for this.
cool is working love it
Very Cool! Made my job easier! Thanks!
This is so useful. I have three questions. Tiny says this is free as it is ad supported. Where are the ads?? Also, are there usage limits on this? And, what happens if a url you submit has already been shortened before ?
The website for its api has documentation for its restful api, there’s no mention of this one. It could stop working at any time !
Python requests example
import requests
url = 'https://dwhistle.wordpress.com/2020/05/28/who-needed-to-be-saved-us-or-earth/'
base_url = 'http://tinyurl.com/api-create.php?url='
url = base_url + url
r = requests.get(url)
print(r.text)
Sadly, don't work using POST method
Sadly, don't work using POST method
It works if you use GET method. Not sure why you'd need to use POST.
Hi there,
I've been using this API since 2020 and it's awesome!
However, suddenly today (20211118) did not get successful response via GET.
Got error code 503.
Please help.
Today, 20211118 doesnt work !!!
Appears a html page with:
Just a moment...
try with https
I got error 503 too from this morning, now it's back
Right @danouche93 it's back now. Thanks
is there a limit to the use of this API?
Wow, Thanks it's working...
It does work*