cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: File uploading problem

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 7 Oct 2008 11:43:40 -0500

On Tue, Oct 7, 2008 at 4:04 AM, Amit Nargund <amit.snargund_at_gmail.com> wrote:

> I am able to POST the contents now, but rapidshare still gives me the error
> saying no file selected. Does anybody knows the reason behind this? Can
> anybody tell me what is missing in this for succesfully uploading a file.

You might try comparing your program's behavior with the
output of the "Live HTTP Headers" extension for Firefox:
  https://addons.mozilla.org/en-US/firefox/addon/3829

I am not familiar with how rapidshare handles these things,
but there might also be some cookies or javascript involved.

Another thing that might help is to set the CURLOPT_REFERER
option to the URL of the upload form, and enable the
CURLOPT_AUTOREFERER and CURLOPT_FOLLOWLOCATION options.

Some sites will even check the User-Agent header as well,
so setting the CURLOPT_USERAGENT to something that looks
more like a browser can't hurt either.

 - Jeff
Received on 2008-10-07