cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

request a PDF file

From: Freedom <FreedomMaster_at_GMX.net>
Date: Wed, 23 Feb 2005 14:05:12 +0100

Hi, I tried a curl request to get a pdf-document, but I got the content
in my browser just as text instead of a PDF-format.
I used the code below:

$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://www.domain/wanted.pdf");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);

But it just seems to work on .html and .pdf files. Who can help me with
a code that is working on .pdf ?

Thank you for any helpful idea.

Sincerely

Fred
Received on 2005-02-23