-
-
Save ngocnb/bd012fc9ace46cce38d9ff08e031680e to your computer and use it in GitHub Desktop.
Tiny URL API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
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.