note 28378 added to function.file
| From: | Dan at rack1 dot php dot net | Date: | Sat, 11 Jan 2003 01:01:24 +0000 |
| Subject: | note 28378 added to function.file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41981@lists.php.net to get a copy of this message | ||
To get the contents of a remote file into a string...
<?php
$line = file("http://example.com");
foreach($line as $nline){
$content="$content$nline";
}
echo $content;
?>
--
http://www.php.net/manual/en/function.file.php
http://master.php.net/manage/user-notes.php?action=edit+28378
http://master.php.net/manage/user-notes.php?action=delete+28378
http://master.php.net/manage/user-notes.php?action=reject+28378