note 15483 added to features.remote-files

From: Date: Thu, 13 Sep 2001 14:23:52 +0000
Subject: note 15483 added to features.remote-files
Groups: php.notes 
Request: Send a blank email to php-notes+get-17976@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 http://php.mediaparks.lv/manual/en/features.remote-files.php

« previous php.notes (#17976) next »