Appendix I. List of Supported Protocols/Wrappers

The following is a list of the various URL style protocols that PHP has built-in for use with the filesystem functions such as fopen() and copy(). In addition to these wrappers, as of PHP 4.3, you can write your own wrappers using PHP script and file_register_wrapper().

Table I-1. URL Wrappers

ProtocolVersionsDescription
http://AllAllows read-only access to files/resources via HTTP.
https://PHP 4.3 and up, with SSL supportAllows read-only access to files/resources via SSL secured HTTP.
ftp://AllAllows read access to existing files and creation of new files via FTP.
ftps://PHP 4.3 and up, with SSL supportThe same as ftp://, but uses SSL when supported by the FTP server.
php://stdinPHP 3.0.13 and upAllows read acess to the standard input stream of the PHP process.
php://stdoutPHP 3.0.13 and upAllows write acess to the standard output stream of the PHP process.
php://stderrPHP 3.0.13 and upAllows write acess to the standard error stream of the PHP process.
php://outputPHP 4.3 and upAllows write acess to the output buffer mechanism, just like echo() and print().
zlib:PHP 4.0.4 - PHP 4.2.3, systems with fopencookie onlyWorks like gzopen(), except that the stream can be used with fread() and the other filesystem functions. This is deprecated as of PHP 4.3 due to ambiguities with filenames containing ':' characters; use compress.zlib:// instead.
compress.zlib://PHP 4.3 and upWorks just like gzopen(), even on systems without fopencookie.
compress.bzip2://PHP 4.3 and upWorks just like bzopen().