cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using curl lib for files download

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Tue, 30 Dec 2008 06:24:25 -0600

On Dec 30, 2008 <sergei.trofimov_at_gmail.com> wrote:

> GET http://site.company.com/test.exe HTTP/1.1

> 404 Not Found
> Server at registrationcenter.intel.com

> Why I got "file not found" error if URL is valid?

I don't know how you can request a file from "site.company.com"
and get a response from "registrationcenter.intel.com" but I
assume you are just using "site.company.com" as an example?

At any rate, a few things to try:

Set CURLOPT_USERAGENT to look like a Firefox or IE user-agent
string, some servers don't like to talk to other clients.

Set CURLOPT_REFERER to the URL of the page you clicked on in
your browser, some servers don't like "off-site" requests.

Install the "Live HTTP Headers" extension for Firefox, and try
downloading the file again, to see if there are any cookies or
other "special" things sent along with the request:
  https://addons.mozilla.org/en-US/firefox/addon/3829

- Jeff
Received on 2008-12-30