Hello,
This is a script that grab download link from http://www.alldebrid.com.
Requirement:
1. Premium account on alldebrid.
2. CURL enable on server.
You have to add "cookie.txt" file on same folder where you put this script. After that change the file permission into "777".
If it works, give me your feedback
Thanks.
This is a script that grab download link from http://www.alldebrid.com.
Requirement:
1. Premium account on alldebrid.
2. CURL enable on server.
You have to add "cookie.txt" file on same folder where you put this script. After that change the file permission into "777".
PHP:
<form method="post" action="">
<input type="text" name="url">
<input type="submit" value="Submit">
<?php
if($_POST['url'])
{
$url=$_POST['url'];
$user = ''; // your username
$pass = ''; // your password
$cookie='cookie.txt';
$login='http://www.alldebrid.com/register/?action=login&returnpage=';
$ch = curl_init($login);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://google.com/');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
$page = curl_exec($ch);
$postfields = "login_login=".$user."&login_password=".$pass;
//echo " <br> $postfields";
$fslogin = "http://www.alldebrid.com/register/?action=login&returnpage=http://www.alldebrid.com/service/";
$ch = curl_init($fslogin);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://google.com/');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
$page3 = curl_exec($ch);
$postfields2 = "";
$loginee= "http://www.alldebrid.com/service.php?link=".$url;
$ch = curl_init($loginee);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://google.com/');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields2);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
$page4 = curl_exec($ch);
if(preg_match('/(http:\/\/.+alldebrid[^\s]+)/', $page4, $link)){
preg_match("%>(.*?)</a>%U", $data, $name);
$URL = trim($link[1]);
$downlz = substr($URL, 0, -1);
$filename = substr(strrchr($downlz, '/'), 1);
}
echo $downlz;
//By : NeVieL47 2011
}
?>
If it works, give me your feedback
Thanks.