:D
i use a script to upload on the filehost...like fileserve filesonic etc..etc...
now i need to convert to allow the upload to netload...
netload have api but i dont know how use this...
example of the part of the script to upload to...
for an example
someone can help me to add the netfile upload function?
thanks :D
i use a script to upload on the filehost...like fileserve filesonic etc..etc...
now i need to convert to allow the upload to netload...
netload have api but i dont know how use this...
example of the part of the script to upload to...
for an example
PHP:
function upUL($value, $usr, $pass, $client){
$filename = basename($value);
$cookieFile = $client.'_Uploaded.to.txt';
$url = "http://uploaded.to/io/login";
$post['id'] = $usr;
$post['pw'] = $pass;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
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);
$page = pHCJ("http://uploaded.to/home","",$cookieFile);
$script = pHCJ("http://uploaded.to/js/script.js","",$cookieFile);
$editKey = generate(6);
$serverUrl = cut_str($script, 'uploadServer = \'', '\'') . 'upload?admincode=' . $editKey . '&id=' . $usr . '&pw=' . sha1($pass);
$fpost['Filename'] = "$filename";
$fpost['Upload'] = 'Submit Query';
$fpost['Filedata'] = "@$value";
pHCJ($serverUrl, $fpost, $cookieFile);
sleep (10);
$page = null;
$search['page'] = 0;
$search['limit'] = 5;
$search['order'] = 'date';
$search['search'] = $filename;
$page = pHCJ("http://uploaded.to/io/me/list/files", $search, $cookieFile);
$json = substr($page, strpos($page, '{"list'));
$linkInfo = json_decode(trim($json));
$linkInfo = $linkInfo->list[0];
$tmp = $linkInfo->id;
if ($tmp = null){$link=null;}
else{$link = 'http://ul.to/' . $linkInfo->id . "/" . $filename;}
return $link;
}
someone can help me to add the netfile upload function?
thanks :D
Last edited: