[Help] PHP Curl Uploader to RapidShare Problem

Status
Not open for further replies.

heppinnz

Active Member
94
2010
2
0
Hi people!!! I have a problem with PHP Curl Uploader to RapidShare, files uploaded but filesize = 0. Please help!

My code:

PHP:
$ch = curl_init();
curl_setopt_array($ch, array(
     CURLOPT_URL => $url,
     CURLOPT_RETURNTRANSFER => 1,
     CURLOPT_POST => 1,
     CURLOPT_POSTFIELDS => "sub=upload&login=$name&password=$pass&filecontent=@$file&filename=$filename"
));
curl_exec($ch);
curl_close($ch);
Thanks.
 
Last edited:
2 comments
Have you tried to use the post values in a array?

PHP:
            CURLOPT_POSTFIELDS => array('sub'=>'upload', 'login'=>$name, 'password'=>$pass, 'filecontent'=>"@$file", 'filename'=>$filename)
 
Status
Not open for further replies.
Back
Top