note 63662 added to ref.curl
| From: | php-general at lists dot php dot net | Date: | Mon, 27 Mar 2006 21:04:29 +0000 |
| Subject: | note 63662 added to ref.curl | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-106780@lists.php.net to get a copy of this message | ||
If you don't have libcurl support, use Streams:
http://us2.php.net/manual/en/ref.stream.php
<?php
/* Read local file from /home/bar */
$localfile = file_get_contents("/home/bar/foo.txt");
/* Identical to above, explicitly naming FILE scheme */
$localfile = file_get_contents("file:///home/bar/foo.txt");
/* Read remote file from www.example.com using HTTP */
$httpfile = file_get_contents("http://www.example.com/foo.txt");
/* Read remote file from www.example.com using HTTPS */
$httpsfile = file_get_contents("https://www.example.com/foo.txt");
/* Read remote file from ftp.example.com using FTP */
$ftpfile = file_get_contents("ftp://user:pass@ftp.example.com/foo.txt");
/* Read remote file from ftp.example.com using FTPS */
$ftpsfile = file_get_contents("ftps://user:pass@ftp.example.com/foo.txt");
?>
----
Server IP: 64.71.164.2
Probable Submitter: 139.70.10.66
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.curl.php
Edit -- http://master.php.net/note/edit/63662
Del: integrated -- http://master.php.net/note/delete/63662/integrated
Del: useless -- http://master.php.net/note/delete/63662/useless
Del: bad code -- http://master.php.net/note/delete/63662/bad+code
Del: spam -- http://master.php.net/note/delete/63662/spam
Del: non-english -- http://master.php.net/note/delete/63662/non-english
Del: in docs -- http://master.php.net/note/delete/63662/in+docs
Del: other reasons-- http://master.php.net/note/delete/63662
Reject -- http://master.php.net/note/reject/63662
Search -- http://master.php.net/manage/user-notes.php