hello
i'm looking for a new host...
i see bitshare and i have this as a part of my script
i try it but... i receive a link...
but this link don't work and give me error for delete-dmca or something else...
the file isnt in my "bitshare filemanager" too
can someone help me?
this is the function
i'm looking for a new host...
i see bitshare and i have this as a part of my script
i try it but... i receive a link...
but this link don't work and give me error for delete-dmca or something else...
the file isnt in my "bitshare filemanager" too
can someone help me?
this is the function
PHP:
function upBS($value, $username, $password, $client){
$post['user'] = $username;
$post['pass'] = $password;
$post['submit'] = "Login";
$cookieFile = $client.'_BitShare.com.txt';
$lurl = "http://bitshare.com/login.html";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $lurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_COOKIEJAR,$cookieFile);
$result = curl_exec ($ch);
curl_close ($ch);
//echo $result;
$purl = "http://bitshare.com/";
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL,$purl);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch1, CURLOPT_HEADER, false);
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch1, CURLOPT_COOKIEFILE,$cookieFile);
$result1= curl_exec ($ch1);
curl_close ($ch1);
//echo $result1;
$page = $result1;
preg_match('/<form action="(.*)" id="uploadform" method="post"/', $page, $upurl);
$url_up = trim($upurl[1]);
$progress_key = cut_str($page, '<input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value="','"/>');
$usergroup_key = cut_str($page, '<input type="hidden" name="APC_UPLOAD_USERGROUP" id="usergroup_key" value="','"/>');
$fpost = array( 'APC_UPLOAD_PROGRESS' => $progress_key,
'APC_UPLOAD_USERGROUP' => $usergroup_key,
'UPLOAD_IDENTIFIER' => $progress_key,
'file[]"; filename="' => '',
'file[]' => "@$value");
$ID = GRC();
$upurl=$url_up.'?X-Progress-ID=undefined'.$ID.'';
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL,$upurl);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch1, CURLOPT_POST, 1);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $fpost);
curl_setopt($ch1, CURLOPT_HEADER, TRUE);
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch1, CURLOPT_COOKIEFILE,$cookieFile);
curl_setopt($ch1, CURLOPT_HTTPHEADER, array('Expect:'));
$result1= curl_exec ($ch1);
curl_close ($ch1);
//echo $result1;
preg_match('%http://bitshare.com/files/(.*)%', $result1, $dlink);
preg_match('%http://bitshare.com/delete/(.*)%', $result1, $delink);
//echo ($dlink[0]."<br />".$delink[0]);
return $dlink[0];
}