API USAGE

http://protege-ddl.com allows developers to interact with the website via an Application Programming Interface (API). If you are planning to use http://protege-ddl.com to create short or customized URLs, do it for free through simple HTTP GET requests.

Introduction
Let's start with an example, maybe the best way to explain the API usage.
First of all you've to build the request URL.

http://protege-ddl.com/api.php?url=megaupload.com,fileserve.com
&t=title
&d=description
&c=Captcha
&pv=Private
&u=username
&up=userpassword
&lp=LinkPassword


Please be careful: remember Multiple URL must be seprate with comma and don't add http:// in url.

The http://protege-ddl.com server will return full URL of the API response:

http://protege-ddl.com/oefvzspurv-google.html

Rate limiting
Every client application has a limited request rate per second. Additional requests will be ignored.

Request format
All the HTTP requests must be directed to http://protege-ddl.com/api.php with the following GET parameters:

* t (Title): Your Protected Link Title
* d (Discription): Your Protected Link Discription
* url (LINKS): the url to shorten.
* c: (Captcha, 1=Yes and 0 - NO) if you want enable captcha for you link use 1 other wise 0
* pv: (Private, 1=Yes and 0 - NO) If you want your link will not display to public and only availabe for you then us 1 for yes 0 for no
* u: (Username) Your user name if you want this URL in your account, You must up (Your Password) with Username
* uo: (Username Password) Your username password
* lp: (Link Password) if you want your link password protect then use this.

Register your application
Registration not need to use API..

 

Example PHP Code

<?php

function getPage ($url) {
if (function_exists("curl_init")) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
return curl_exec($ch);
curl_close($ch);
} else {
return file_get_contents($url);
}
}

$title=http://protege-ddl.com/api.php?url=facebook.com,orkut.com,games.com&t=title&n=name&d=description&c=Captcha&pv=Private&u=demo&up=demo';
$tmp = getPage($title);
echo $tmp;

?>