Skip to content

Instantly share code, notes, and snippets.

@MikeRogers0
Created June 10, 2012 22:26
Show Gist options
  • Select an option

  • Save MikeRogers0/2907534 to your computer and use it in GitHub Desktop.

Select an option

Save MikeRogers0/2907534 to your computer and use it in GitHub Desktop.
Tiny URL API
<?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
*/
?>
@drewmerk
Copy link
Copy Markdown

drewmerk commented Oct 7, 2021

Sadly, don't work using POST method

It works if you use GET method. Not sure why you'd need to use POST.

@Zulff-GitHub
Copy link
Copy Markdown

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.

@jvrocamora
Copy link
Copy Markdown

jvrocamora commented Nov 18, 2021

Today, 20211118 doesnt work !!!

Appears a html page with:
Just a moment...

@abhisheksurve45
Copy link
Copy Markdown

try with https

@danouche93
Copy link
Copy Markdown

danouche93 commented Nov 18, 2021

I got error 503 too from this morning, now it's back

@inderjitpassi
Copy link
Copy Markdown

Right @danouche93 it's back now. Thanks

@rickykusriana
Copy link
Copy Markdown

is there a limit to the use of this API?

@AliAryanTech
Copy link
Copy Markdown

Wow, Thanks it's working...

@Techbeastz
Copy link
Copy Markdown

does this still working in right now???

@dardo82
Copy link
Copy Markdown

dardo82 commented Nov 11, 2025

does this still working in right now???

Did you try it? πŸ‘¨β€πŸ’»

@Techbeastz
Copy link
Copy Markdown

does this still working in right now???

Did you try it? πŸ‘¨β€πŸ’»

No thats why I am asking it

@dardo82
Copy link
Copy Markdown

dardo82 commented Nov 11, 2025

does this still working in right now???

Did you try it? πŸ‘¨β€πŸ’»

No thats why I am asking it

Problem solved. πŸ™ƒ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment