<?php
//linkbucks converter by m1rr0z
function curl($url,$cookies,$post){
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
if ($cookies) curl_setopt($ch, CURLOPT_COOKIE, $cookies);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if ($post){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($ch, CURLOPT_TIMEOUT, 25);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 25);
$page = curl_exec( $ch);
curl_close($ch);
return $page;
}
######### linkbucks unlock
function linkbucks($lien)
{
if (preg_match('#(linkbucks)#', $lien, $lien0))
{
$lienpre = curl($lien,'','');
if (preg_match("#Lbjs.TargetUrl = '(.*)';#", $lienpre, $url))
{
$linkgo = $url[1];
}
}
return $linkgo;
}
#########
$linkbucks_link = ''; //your linkbucks link here
$converted_link = linkbucks($linkbucks_link);
echo $converted_link;
?>
//Json body
{"OrigLink":"http://www.yourlinkHere","AdTypeID":"2","ContentTypeID":"1","LinkTypeID":1,"LinkGroupID":0,"exclusionsList":"","TargetOptionID":0,"LinkAliasID":"1","FrequencyCap":0}
Here's request body that you need to send
Are you need a full working script ?Code://Json body {"OrigLink":"http://www.yourlinkHere","AdTypeID":"2","ContentTypeID":"1","LinkTypeID":1,"LinkGroupID":0,"exclusionsList":"","TargetOptionID":0,"LinkAliasID":"1","FrequencyCap":0}
<?php
class LinkbucksGenerator
{
public function __construct($username, $password)
{
$res = $this->sendRequest('http://www.***************',
'__VIEWSTATE=%2FwEPDwUKMTgyODE4OTcxNA9kFgJmD2QWAgIBDxYCHgZhY3Rpb24FAS8WAgIDDxYCHgdWaXNpYmxlZ2QYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFI2N0bDAwJExlZnRNZW51QmFyJGN0bDAwJExvZ2luSW1nQnRuS8hakOPTjCRlsWTaAs%2Bzra8AOq62iJvb2b1%2BaYjQ3bA%3D&__EVENTVALIDATION=%2FwEWBAL%2Bzvj%2BBQK7qsuzDQL4%2Fd%2FXBwKsntP%2FCzjrmm0uzhVnRRESgrufVC4zwhIpeKxQ1DE28b0Xa30%2B&ctl00%24LeftMenuBar%24ctl00%24Username=' . $username . '&ctl00%24LeftMenuBar%24ctl00%24Password=' . $password . '&ctl00%24LeftMenuBar%24ctl00%24LoginImgBtn.x=73&ctl00%24LeftMenuBar%24ctl00%24LoginImgBtn.y=17');
if( (!preg_match('/Object moved to <a href="\/default\.aspx">here<\/a>/', $res)))
{
if((!preg_match('/Logged in as: <strong>' . $username . '<\/strong>/', $res)))
{
die('Invalid login credentials');
}
}
}
public function generateLink($url, $adTypeID = 2)
{
$res = $this->sendRequest('http://www.***************ajaxpro/LinkGenLib,Linkbucks.ashx',
'{"OrigLink":"'. $url .'","AdTypeID":"'. $adTypeID .'","ContentTypeID":"1","LinkTypeID":1,"LinkGroupID":0,"exclusionsList":"","TargetOptionID":0,"LinkAliasID":"1","FrequencyCap":0}', 1);
if(preg_match('/"NewLink":"(.*?)"/', $res, $m))
{
return $m[1];
}
else
{
return $res;
}
}
private function sendRequest($url, $post, $type = 0)
{
$ch = curl_init();
if($type == 1)
{
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-AjaxPro-Method: SingleLinkParse',
'Content-Type: application/json',
'Content-Length: ' . strlen($post)
));
}
curl_setopt($ch, CURLOPT_COOKIEJAR, 'tmp/cookies');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'tmp/cookies');
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($post));
curl_setopt($ch,CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
}
$linkGenerator = new LinkbucksGenerator('linkbucksusername', 'linkbuckspassword');
$result = $linkGenerator->generateLink('url to convert');
echo $result; // outputs your link
?>
http://www21.zippyshare.com/v/33282435/file.html
Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.