note 64690 rejected from function.fopen by nlopess

From: Date: Wed, 19 Apr 2006 19:01:01 +0000
Subject: note 64690 rejected from function.fopen by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108672@lists.php.net to get a copy of this message
Note Submitter: wwarsin at gmail dot com ---- I am having this problem with the fopen() for picture files over the net ex. <?PHP $file1 = fopen('http://us2.php.net/images/php.gif', 'r');/*gets the picture from the web*/ $contents = fread($file1);/*reads the contents*/ $file1 = fopen('php.gif', 'r');/*opens or creates on computer*/ fwrite($file2, $contents);/*writes to the file on the computer*/ fclose($file1); fclose($file2); ?> <html> <img src="php.gif"> </html> this code will work but for some reason it messes up like half of the file if somone can help me please email me at wwarsin@gmail.com

« previous php.notes (#108672) next »