I have made a cURL script to remotely upload to rapidshare but it is just is'nt working. I am getting a blank page.!! <?php function cURL($url,$header,$cookie,$p) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if($p){ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $p); }; $result = curl_exec($ch); if($result){ return $result; }else{ return curl_error($ch); }; curl_close($ch); }; echo cURL("http://rs250gc.rapidshare.com/cgi-bin/upload.cgi?rsuploadid=9961252676201783",null,"user=c3797241-*******","freeaccountid=3797241&password=*****&filecontent=@E:\\xampp\\htdocs\\imgresize.zip"); ?> Code (markup):
You are trying to echo the contents of a zip file? What is the page that you are trying to echo have? What are its contents?
i m trying to upload a zip file.!!! if you know "@" sign directs curl to send the file.!!! i have used echo to show status.!!
Nevertheless it's worth checking since it will take about 10 seconds (is_readable()...). Also, explicitly check your $cookie to see if it is what the server is expecting.
if replace url with any other page of rapidshare it shows the contents which means rapidshare is accepting cookie but the problem seems to be in uploading.!!!