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

curl-and-php

Re: Download remote PDF using php code

From: Denis K <kudenv_at_gmail.com>
Date: Thu, 3 Aug 2017 17:32:02 +0300

Verify first off all what file hosts in the public location

On 3 Aug 2017 5:30 p.m., "Denis K" <kudenv_at_gmail.com> wrote:

> Look for pure downloading you just need denote to curl remote host and
> path to file and it could be perform downloading.
>
>
> On 3 Aug 2017 4:23 p.m., "Stephen Pynenburg" <spynenburg_at_gmail.com> wrote:
>
>> Hello Nour,
>> Some basic steps to try for debugging:
>> - is the PDF file on disk the same size as expected (i.e. how big is the
>> PDF)? If you are getting a much shorter response than expected, your curl
>> request is not receiving the PDF data and you need to find out why.
>> - what is the HTTP response code? (use curl_getinfo()). Are you missing a
>> redirect?
>> - does the server require some cookies or other state to access the file?
>> - have you looked in the response headers? Is content-length the same as
>> expected?
>>
>> Stephen
>>
>> On Thu, Aug 3, 2017 at 7:59 AM, Nour Omar <eng.nour.omar87_at_gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I don't know, I'm not informed about it. I only used the code that i
>>> sent to you.
>>> Note: my pdf files contain designs (graphics).
>>> Can you please tell me what is missing that my code might work?
>>>
>>> Best regards
>>> Nour
>>>
>>> Sent from my iPhone
>>>
>>> > On Aug 3, 2017, at 12:33 PM, Nima Sadjadi <nsadjadi_at_gmail.com> wrote:
>>> >
>>> > Had you set the header() of your output page correctly?
>>> >
>>> >
>>> > _______________________________________________
>>> > https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>>>
>>> _______________________________________________
>>> https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>>>
>>
>>
>> _______________________________________________
>> https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>>
>>

_______________________________________________
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2017-08-03