Skip to content
WJunction - Webmaster Forum

[Help] PHP Curl Uploader to RapidShare Problem

Status
Not open for further replies.
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.

About the author

H
Active Member · Joined
94
Messages
2
Reactions
8
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom