logo

:: Developers API :: STATUS: ACTIVE


YRN.Me comes with a simple, handy and easy to use API which you can use in your web applications to shorten your URLs remotely from any web site. Our simple api supports _GET methods for submitting the URL to be shorten, Follow the instructions bellow:


HTTP RESPONSE METHOD:

_GET REQUEST (SERVER = 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

If you are having any difficulty, using this API kindly contact rufaai(@)gmail.com