Skip to content

Instantly share code, notes, and snippets.

@Gabboxl
Forked from MikeRogers0/tiny-url-api.php
Created April 7, 2018 19:08
Show Gist options
  • Save Gabboxl/b9deef7e4ca11e87fdf5f972494ffab0 to your computer and use it in GitHub Desktop.
Save Gabboxl/b9deef7e4ca11e87fdf5f972494ffab0 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
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment