Easy to remember and to share

Please wait...
Security Code
فارسی English

Start * NEW

API

<vtwo data-type="urlshortener" data-key="87075078-9b23-5fc8-8ca9-60d8e6c9e611"></vtwo>
<vtwo data-type="urlshortener" data-style="aqua" data-key="87075078-9b23-5fc8-8ca9-60d8e6c9e611"></vtwo>
<vtwo data-type="urlshortener" data-caption="لینک کوتاه(Short Link)" data-key="87075078-9b23-5fc8-8ca9-60d8e6c9e611"></vtwo>
<!-- در آخر صفحه -->
<script type="text/javascript" src="https://vtwo.org/en/apis/platform.js"></script>

Result:

Webservice

<meta charset="UTF-8">
<?php
include "nusoap.php" ;
 
//VTwo Account > User Page > API & Webservice > Private Key
$privatekey = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' ;
 
//1. False   2. True   3. Custom string 
$anchor = false ;
 
//Your address
$address = 'http://example.com/abcdefghABCDEFGH123456789.html' ;
 
//Request
$client = new nusoap_client( 'http://webservice.vtwo.org/en/urlshortener' ) ;
if ( $client->fault ) {
    echo '<h2>Fault</h2>' . $client->getError() ;
} else {
    $result = $client->call( 'URLShortener', array(
        $privatekey,
        $anchor,
        $address ) ) ;
    $error = $client->getError() ;
    if ( $error ) {
        echo '<h2>Error</h2>' . $error ;
    } else {
        echo "<h2>$result</h2>" ;
    }
}
?>

Result: http://2wo.ir/xxxxxx

Download nusoap.php.zip

VTwoGroup