[PHP] Re: Binary file copy

2008-10-16 Thread Nathan Rixham
Jay Moore wrote: in the response you'll be getting the raw http response (including headers); so you're saving them as well thus not a valid image file. can't see why: $image = file_get_contents('http://10.10.10.3/record/current.jpg'); wouldn't work for you.. file_get_contents worked beautifu

Re: [PHP] Re: Binary file copy

2008-10-16 Thread Bastien Koert
On Thu, Oct 16, 2008 at 2:02 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote: > Jay Moore wrote: > >> Greetings list! >> >> Say I want to copy a jpg from a remote server onto mine, using PHP. Right >> now, my script opens a socket to the remote server, and opens the image >> file. It copies its conte

[PHP] Re: Binary file copy

2008-10-16 Thread Jay Moore
in the response you'll be getting the raw http response (including headers); so you're saving them as well thus not a valid image file. can't see why: $image = file_get_contents('http://10.10.10.3/record/current.jpg'); wouldn't work for you.. regardless though if you are using sockets, be sure

[PHP] Re: Binary file copy

2008-10-16 Thread Nathan Rixham
Jay Moore wrote: Greetings list! Say I want to copy a jpg from a remote server onto mine, using PHP. Right now, my script opens a socket to the remote server, and opens the image file. It copies its contents into a dummy variable, opens a new file on my server, and dumps the contents of the