note 71556 deleted from function.file-get-contents by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:38:20 +0000 |
| Subject: | note 71556 deleted from function.file-get-contents by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215239@lists.php.net to get a copy of this message | ||
Note Submitter: siegfri3d at gmail dot com
----
Use the previous example if you want to request the server for a special part of the content, IF and
only if the server accepts the method.
If you want a simple example to ask the server for all the content, but only save a portion of it,
do it this way:
<?php
$content=file_get_contents("http://www.google.com",FALSE,NULL,0,20);
echo $content;
?>
This will echo the 20 first bytes of the google.com source code.