phpbar.de logo

Mailinglisten-Archive

[php] Re: Re: [php] images per http downloaden - nachtrag

[php] Re: Re: [php] images per http downloaden - nachtrag

Peter Holm PHolm_(at)_gmx.de
Mon, 24 Jul 2000 20:30:14 +0200


$filename = 'http://www.yourserver.com/bild.jpg';
$outfile  = 'bild.jpg';

$fd = fopen($filename, "r");

if (!$fd) {
echo "Unable to open remote file.\n";
exit;
}

$size = filesize ($filename);
echo "filesize: ".$size."\n";

$contents = fread ($fd, 20000);
fclose($fd);

echo $contents;
 
$fp = fopen($outfile, "a+");
fwrite($fp, $contents);
fclose($fp);




Have a nice thread,
Peter


php::bar PHP Wiki   -   Listenarchive