note 15483 deleted from features.remote-files by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 20:41:06 +0000 |
| Subject: | note 15483 deleted from features.remote-files by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25414@lists.php.net to get a copy of this message | ||
A sample, how to save a simple jpeg image!
<?
$fc = fopen("myimage.jpg", "wb");
$file = fopen ("http://www.pic.com/image2.jpg",
"rb");
if (!$file) {
echo "Unable to open remote file.\n";
exit;
}
else
{
while (!feof ($file)) {
$line = fread ($file, 1028);
fwrite($fc,$line);
}
}
fclose($fc);
fclose($file);
echo "ok";
?>
Sandis,
www.aids.lv