note 64690 added to function.fopen
| From: | wwarsin at gmail dot com | Date: | Wed, 19 Apr 2006 18:49:16 +0000 |
| Subject: | note 64690 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108671@lists.php.net to get a copy of this message | ||
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
----
Server IP: 64.71.164.2
Probable Submitter: 68.73.2.201
----
X-Spam-Status: Yes, hits=5.2 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HTML_IMAGE_ONLY_04,HTML_MESSAGE autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- http://master.php.net/note/edit/64690
Del: integrated -- http://master.php.net/note/delete/64690/integrated
Del: useless -- http://master.php.net/note/delete/64690/useless
Del: bad code -- http://master.php.net/note/delete/64690/bad+code
Del: spam -- http://master.php.net/note/delete/64690/spam
Del: non-english -- http://master.php.net/note/delete/64690/non-english
Del: in docs -- http://master.php.net/note/delete/64690/in+docs
Del: other reasons-- http://master.php.net/note/delete/64690
Reject -- http://master.php.net/note/reject/64690
Search -- http://master.php.net/manage/user-notes.php