YRN.Me API Updated
For third-party users, the yrn.me api has been updated all you need to do is update your api url and everything will work fine.
Update your file_get_contents link to.
http://yrn.me/api/shrink.php
On successful shirink, this should return true! and the new link and on failure it will return false.
Your shrink request uri should look like this:
http://yrn.me/api/shrink.php?url=http://long-web-address.com/anypage/toolong/
Thank you.
The basic API for your remote apps!
The API allows you to shorten URL remotely for your web application uses!
» HTTP RESPONSE METHOD:
_GET REQUEST (PAGE = http://yrn.me/api/get.php).
e.g: http://yrn.me/api/get.php?url=http://your-long-url.com
Upon requesting the URL you would like to shorten as specified above, a HTTP response page will be returned. If the URL was successfully shortened, the body of the response will contain only the new shortened URL, in plain text.
However, If the request was unsuccessful, the body of the response page will contain an error message like “Error: invalid URL”.
» URL RETURN METHOD:
This method may be easier for beginers, its comes via the _POST Request. Simply create hidden fields containig the URL to be shorted and the return page. Your shortened URL will be returned to your selected return page via GET.
_POST METHOD (ACTION = http://yrn.me/api/post.php).
[form id="url_shortening" name="yrn.me" method="post" action=""]
[input type="hidden" name="url" value="http://your-long-url.com" /]
[input type="hidden" name="return_url" value="http://yourwebsite.com/shortned.html" /]
[input type="submit" name="submit" value="Short This" /]
[/form]
The form code will shorten your long URLs for you and return the shortened URL via GET Method to your page. in the above case, it will return to your site like http://yourwebsite.com/shortened.html?url=http://yrn.me/3o0jy
The advance API still under developement which will allow you to better utililize the URL Shortner. ;)