note 71556 added to function.file-get-contents
| From: | siegfri3d at gmail dot com | Date: | Tue, 05 Dec 2006 20:52:27 +0000 |
| Subject: | note 71556 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120320@lists.php.net to get a copy of this message | ||
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:
<?
$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.
----
Server IP: 66.163.161.117
Probable Submitter: 88.149.150.95
----
Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php
Edit -- https://master.php.net/note/edit/71556
Del: integrated -- https://master.php.net/note/delete/71556/integrated
Del: useless -- https://master.php.net/note/delete/71556/useless
Del: bad code -- https://master.php.net/note/delete/71556/bad+code
Del: spam -- https://master.php.net/note/delete/71556/spam
Del: non-english -- https://master.php.net/note/delete/71556/non-english
Del: in docs -- https://master.php.net/note/delete/71556/in+docs
Del: other reasons-- https://master.php.net/note/delete/71556
Reject -- https://master.php.net/note/reject/71556
Search -- https://master.php.net/manage/user-notes.php