Anzeige
Integrating arminizing functionality into your (web) application is super easy. Simply call arm.in handing over your link like this (NB: The URL must not be URL encoded as otherwise a bug in Apache’s mod_rewrite will f*ck up things badly):
http://arm.in/arminize/http://www.put-a-url-to-arminize-here.com
You will receive an xml-stream that looks like this, for example:
<url>
<created>2009-01-19 16:44:29</created>
The tag <arminized_url> will contain your new short URL. In case something goes wrong, you will get this:
<url>
The <error> tag might contain: NO_URL, TOO_LONG_URL (if the URL is more than 2048 characters long), TOO_SHORT_URL (if the URL given is already shorter than the arminized one), INVALID_URL or - if something goes awfully wrong - FATAL_ERROR. That's it - there is nothing more to say!
Below is an easy yet fully working example of how to use the arminize api. The function arminize() simply expects the link you want to arminize and will return the short link or false if there was an error.
{
if ( isset( $getXML->error ) )
{
{
return false;
else
{
// Simple test if everything works fine
$short_link = arminize( "http://www.bodalgo.com/index_english.php" );
if ( $short_link == false)
