Was wondering for some free plus good filehost better then Rapidshare or Mediafire. & ShareShiz named me Bayfiles.com

I have been using it from yesterday & am kind of loving it. Totally awesome. Anyways some of the members were asking for RL upload plugin to Bayfiles.com. here it is along with a function if u has custom script. It uses Bayfiles' API

PHP Code: 
echo uploadBF("./temp.txt");
function 
uploadBF($x,$retry=0)
{
    
$user="";
    
$pass="";
    if(
trim($user)!="" && trim($pass)!="")
    {
        
$page=curl('http://api.bayfiles.com/v1/account/login/'.$user.'/'.$pass.'');
        
$page=json_decode($page);
        
$session=$page->session;
        
$page=curl("http://api.bayfiles.com/v1/file/uploadUrl?session=$session");
    }
    else
    {
        
$page=curl("http://api.bayfiles.com/v1/file/uploadUrl");
    }
    
$page=json_decode($page);
    
$url=$page->uploadUrl;
    
$page=curl($url,array('file'=>"@$x"));
    
$page=json_decode($page);
    
$url=$page->downloadUrl;
    if(
$url=="" && $retry!=1)
        return 
uploadBF($x,1);
    else
        return 
$url;
}
function 
curl($link$postfields ''

    
$ch curl_init($link); 
    
curl_setopt($chCURLOPT_RETURNTRANSFER1); 
    
curl_setopt($chCURLOPT_HEADER0); 
    
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
    
curl_setopt($chCURLOPT_USERAGENT'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01'); 
    if(
$postfields
    { 
        
curl_setopt($chCURLOPT_POST1); 
        
curl_setopt($chCURLOPT_POSTFIELDS$postfields); 
    } 
    
curl_setopt($chCURLOPT_CONNECTTIMEOUT60);
    
curl_setopt($chCURLOPT_TIMEOUT1200);
    
$page curl_exec($ch);
    
curl_close($ch); 
    return(
$page); 

RL PLUGIN
Code: 
http://bayfiles.com/file/1tXr/AuQnIB/bayfiles-rl-plugin.rar
Cheers
CJ Reviewed by CJ on . Bayfiles.com RL upload plugin & function Was wondering for some free plus good filehost better then Rapidshare or Mediafire. & ShareShiz named me Bayfiles.com I have been using it from yesterday & am kind of loving it. Totally awesome. Anyways some of the members were asking for RL upload plugin to Bayfiles.com. here it is along with a function if u has custom script. It uses Bayfiles' API echo uploadBF("./temp.txt"); function uploadBF($x,$retry=0) { $user=""; $pass=""; Rating: 5