I made one, but it uses ftp not web upload, then sleep a bit, and scrape the link.
$postdata="id=2705986&pw=password";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, 'http://uploaded.to/io/login');
$result1 = curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, 'http://uploaded.to/io/me/list/files');
$result2 = curl_exec($ch);
#echo str_replace("\n","<br>",$result2);
$arr=json_decode($result2,true);
echo 'http://uploaded.to/file/'.$arr['list']['0']['id'];
<?php
/*
* By hover for wjunction. No rights reserved !
*
*/
function ultocookie ($username,$password){
$ch = curl_init("http://uploaded.to/io/login");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies");
$ullogin = array(
'id'=>$username,
'pw'=>$password
);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $ullogin);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result=curl_exec ($ch);
curl_close($ch);
}
function ultogetfilelink ($file){
$ch = curl_init("http://uploaded.to/io/me/list/files");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies");
$getfilelist = array(
'page'=>'0',
'limit'=>'100',
'order'=>'date',
'dir'=>'desc',
'search'=>''
);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $getfilelist);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result=curl_exec ($ch);
curl_close($ch);
$result = json_decode ($result,true);
foreach ($result['list'] as $key => $value)
{
if ($value['filename'] == $file)
break;
return $value['id'];
}
}
function ulftp ($file,$username,$password)
{
$name = substr ($file, strripos ($file, "/"));
$curlfscmd ="curl -T ".$file." ftp.ul.to --user ".$username.":".$password;
$succes = false;
while ($succes === false){
system ($curlfscmd,$ftpstatus);
if ($ftpstatus === 0) $succes = true;
}
//get download link (max 10 attemps, if this limit is reached we consider the upload as failed and re-upload it again
$i = 0;
$succes = false;
while ($succes === false)
{
if ( $i === 10)
break;
//sleep 30 secs before trying to get download link
sleep (30);
ultocookie($username,$password);
$fileid = ultogetfilelink($name);
unlink ("cookies");
if (isset ($fileid) === true)
{
$succes = true;
$ulto = 'http://ul.to/'.$fileid.$name;
}
else $i++;
}
return $ulto;
}
?>
$myultolink = ulftp ('file_path','username','password');
[17]=>
array(11) {
["id"]=>
string(8) "*****"
["date"]=>
string(5) "1 day"
["filename"]=>
string(9) "audio.m4a"
["desc"]=>
NULL
["size"]=>
string(7) "6,71 MB"
["admin"]=>
string(12) "******"
["file_extension"]=>
string(4) ".m4a"
["dls"]=>
string(1) "0"
["lastdownload"]=>
string(12) "no entry yet"
["privacy"]=>
string(0) ""
["ddl"]=>
bool(false)
}
}
["listopts"]=>
array(4) {
["page"]=>
int(0)
["hasPrevious"]=>
bool(false)
["hasNext"]=>
bool(false)
["maxPage"]=>
int(1)
}
}
{"list":[{"id":"*****","date":"8 Minutes","filename":"ul.to.php","desc":null,"size":"2,19 KB","admin":"****","file_extension":".php","dls":"0","lastdownload":"no entry yet","privacy":"","ddl":false}],"listopts":{"page":0,"hasPrevious":false,"hasNext":true,"maxPage":18}}