Okay, I have just successfully transferred the file from the remote server 
to my server using cURL by first authenticating, saving a cookie and then 
sending another request for the file. I'll proceed with my project using 
this method unless I get any feedback relating to my issue with HTTPSocket.

On Saturday, 18 August 2012 08:39:24 UTC+1, Stuart Bridger wrote:

> I am having problems uploading files from a remote server. Some of the 
> files download fine but others are incomplete. Strangely, the incomplete 
> files are always exactly the same length but I get unexpected end of file 
> when uncompressing them using gzip.
>
> $httpSocket = new HttpSocket();
>> $zipFile = fopen(TMP . 'tmp_file.gz', 'w');
>>
>> $httpSocket->setContentResource($zipFile);
>> $fileResponse = $httpSocket->get('URL_to_file', array(), array('redirect' 
>> => true));
>>
>> fclose($zipFile);
>>
>
> The URL redirects to an Amazon S3 bucket.
>
> Is there any way of checking if this is a problem at my end? Looked in 
> Apache and PHP error logs but can see nothing relevant.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to