Problem getting binary data over http

[email protected] (Marc Aßmann) Sat, 10 Jun 2000 03:34:27 +0200
Newsgroups php.version4
Message-ID <001701bfd27c$052742e0$5613e195@yuliette>
Hello List!

I am trying to get images with a little script over http.
But the data that is written on my harddrive is corrupted :-(

Is this a lame question? Does anyone know how to do it better? Is this a
bug?

Here a little snippet to test:

<?php

$fp = fopen("http://www.php.net/gifs/logo.gif","r");

$Image = fread($fp,150000);

$fp2 = fopen("logo.gif", "w");

fwrite($fp2,$Image,150000);

fclose($fp2);

?>