Filesonic URL Error - Webupload / API ( RL , Sborg....)

Status
Not open for further replies.

viruz99

Active Member
1,547
2010
96
0
Hey guys ,

Since Filesonic changed their theme & the file urls , been having loads of problems .

I guess everyone using Sborg , Rapidleech etc.. are experiencing same thing

Test :

Upload a small file via web upload : http://screensnapr.com/e/FuAp3I.png

Now check the link generated : http://www.filesonic.com/file/4348986665

Getting same Link when uploading via api


Practically every user is complaining about the new theme etc... Let's hope they revert back or atleast fix the bugs on the current one





 
9 comments
it would ofc... but u dont have any other way out right now :| as the problem lies with api...api is sending those old number which are not being used right now. When FSc updates thr code to display the new link format.... all the codes of sborg, rl, etc would start working :|


EDIT:
oh wait a sec if u are ok with 2 more seconds delay u can even move the file into another folder so the file doesnt get queued up in filemanager.

Ps... first shift all the current files in root to some other folder :|
 
Last edited:
Are they even going to fix the link to the newly uploaded files? Or do we have to manually go into file manager and grab the link one by one...?
 
They've changed their url structure to be mostly alpha numeric. Was previously numeric only. This causes issues, as their internal referencing is still numeric.
 
workaround until api problem is sorted out...
PHP:
//To get the link
echo uploadfsc(getcwd()."/x.txt",'manohar_pandey@yahoo.co.in','Random');

//function code
function uploadfsc($x,$email,$pass){
	$var = curl('http://api.filesonic.com/upload?method=getUploadUrl&u='.$email.'&p='.$pass,'');
	preg_match('/"http:(.*?)"/',$var,$match);
	$url = trim(stripslashes($match[0]),'"');
	$post = array('files[]' => "@$x");
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, trim($url));
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$result = curl_exec($ch);
	$result = curl("http://www.filesonic.com/user/login",array('email'=>$email,'password'=>$pass,'redirect'=>'/','rememberMe'=>'1','controls[submit]'=>'submit'), "", true);
	preg_match_all("/Set-Cookie: (.*?) /",$result,$matches);
	$cookie="";
	for($i=count($matches[1])-1;$i>=0;$i--)
	{
		$match = $matches[1][$i];
		$cookie_var = str_ireplace(strrchr($match,'='),"",$match);
		if (stripos($cookie,$cookie_var)===false)
			$cookie.=$match;
	}
	$result = curl("http://www.filesonic.com/filesystem/browse/D0/1",array('queryString'=>basename($x)),$cookie.'fs_orderFoldersBy=date;fs_orderFoldersDirection=desc;');
	preg_match('/<input type="checkbox" (.*?) rel="(.*?)"(.*?)\s*(.*?)"'.basename($x).'">/i',$result,$match);
	if($match[2]!="")
		return "http://www.filesonic.com/file/".$match[2];
	else
		return "";
}
function curl($url, $postdata, $cookie = "", $header = false)
{
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	if($header == true)
		curl_setopt($ch, CURLOPT_HEADER, 1); 
	if($cookie != "")
	{
	curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
	curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
	}
	if($postdata != "")
	{
		curl_setopt($ch, CURLOPT_POST, 1); 
		curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); 
	}
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
	curl_setopt($ch, CURLOPT_TIMEOUT, 1200);
	$source_code = curl_exec($ch);
	curl_close($ch);
	return $source_code;
}
 
Last edited:
Status
Not open for further replies.
Back
Top