Announced in CB to release it and here it is.

Note: It is NOT for sBorg or phpUploader or Yawn's Script! It's in cURL and since those scripts use cURL to upload, you can get an idea how to port it to one of the scripts mentioned above. Without any delay, here we go:

PHP Code: 
function uploadFiSO($x){
    if(!
file_exists(dirname(__FILE__).'\fisocookie.txt'))
    {
        
//Login if there is no cookie
        
$val postHost("http://www.filesonic.in/user/login""email=$username&redirect=%2F&password=$password",""'fisocookie.txt');
    }
    
    
$cook file_get_contents('fisocookie.txt');

    
preg_match('/PHPSESSID.*/'$cook$match);
    
$sessionID trim(str_replace('PHPSESSID'''$match[0]));

    
$millisec round((microtime(true) * 1000.0));
    
$random rand(0,90000);

    
$url 'http://s115.filesonic.in/?X-Progress-ID=upload_'.$millisec.'_'.$sessionID.'_'.$random;

    
$post = array('upload[]' => "@$x");

    
$ch curl_init();
    
curl_setopt($chCURLOPT_URLtrim($url));
    
curl_setopt($chCURLOPT_POST1);
    
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
    
curl_setopt($chCURLOPT_POSTFIELDS$post);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_COOKIEFILEdirname(__FILE__).'\fisocookie.txt');
    
//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); //Damn HTTP Error 417
    
$result curl_exec($ch);
    if(
curl_errno($ch)){
    echo 
"ERROR - " curl_error($ch);
    }
    
curl_close($ch);

    
$result postHost('http://www.filesonic.in/upload-completed/upload_'.$millisec.'_'.$sessionID.'_'.$random'',dirname(__FILE__).'\fscookie.txt');

    
preg_match('/F[0-9]+/'html_entity_decode($result), $match);

    echo 
'http://www.filesonic.com/file/'.str_replace('F','',$match[0]).'/'.$x;
}

function 
postHost($url$data$cookie$storCook null){
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    if(
$cookie != "")
        
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
    if(
$data != ""){
        
curl_setopt($chCURLOPT_POST1);
        
curl_setopt($chCURLOPT_POSTFIELDS$data);
    }
    if(isset(
$storCook)){
        
curl_setopt($chCURLOPT_COOKIEJARdirname(__FILE__).'\\'.$storCook);
        
curl_setopt($chCURLOPT_COOKIEFILEdirname(__FILE__).'\\'.$storCook);
    }
    
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    
curl_setopt($chCURLOPT_RETURNTRANSFER,true);
    
curl_setopt($chCURLOPT_HTTPHEADER, array('Expect:')); 
    
$page curl_exec($ch);
    
curl_close($ch);

    return 
$page;


$x is the filename of the file to be uploaded. If you have any problems, do post and I'll try my best to sort it out

Usage: Copy paste the code above in a PHP file and then call it like this
PHP Code: 
uploadFiSO('/path/to/file'); 
Regards,
gunda316
Gaurav Reviewed by Gaurav on . Uploading to FileSonic Using cURL Announced in CB to release it and here it is. Note: It is NOT for sBorg or phpUploader or Yawn's Script! It's in cURL and since those scripts use cURL to upload, you can get an idea how to port it to one of the scripts mentioned above. Without any delay, here we go: function uploadFiSO($x){ if(!file_exists(dirname(__FILE__).'\fisocookie.txt')) { //Login if there is no cookie $val = postHost("http://www.filesonic.in/user/login", Rating: 5