Chapter 19. Using remote files
As long as allow_url_fopen is enabled in php.ini, you can
use HTTP and FTP URLs with most of the functions that take
a filename as a parameter. In addition, URLs can be used with
the include(), include_once(), require() and require_once()
statements. See Appendix J for more information about the
protocols supported by PHP.
Note: In PHP 4.0.3 and older, in order to use URL wrappers,
you were required to configure PHP using the configure option
--enable-url-fopen-wrapper.
Note: The Windows versions of PHP earlier than PHP 4.3 did
not support remote file accessing for the following functions:
include(), include_once(), require(), require_once(), and
the imagecreatefromXXX functions in the Reference XLI, Image
Functions extension.
For example, you can use this to open a file on a remote
web server, parse the output for the data you want, and
then use that data in a database query, or simply to output
it in a style matching the rest of your website.
|