phar://

PHP Archive The phar:// stream wrapper is available since PHP 5.3.0. See Phar stream wrapper for detailed description. See also: Phar context options -

ssh2://

Secure Shell 2 ssh2.shell:// ssh2.exec:// ssh2.tunnel:// ssh2.sftp:// ssh2.scp:// PHP 4.3.0 and up (PECL) Note: This wrapper is not enabled by default In order to use the ssh2.*:// wrappers you must install the » SSH2 extension available from » PECL. In addition to accepting traditional URI login details, the ssh2 wrappers will also reuse open connections by passing the connection resource in the host portion of the URL.

glob://

Find pathnames matching pattern The glob: stream wrapper is available since PHP 5.3.0. Examples: Basic usage <?php // Loop over all *.php files in ext/spl/examples/ directory // and print the filename and its size $it = new DirectoryIterator("glob://ext/spl/examples/*.php"); foreach($it as $f) {     printf("%s: %.1FK\n", $f->getFilename(), $f->getSize()/1024); } ?>

ogg://

Audio streams Files opened for reading via the ogg:// wrapper are treated as compressed audio encoded using the OGG/Vorbis codec. Similarly, files opened for writing or appending via the ogg:// wrapper are writen as compressed audio data. stream_get_meta_data(), when used on an OGG/Vorbis file opened for reading will return various details about the stream including the vendor tag, any included comments, the number of channels, the sampling rate, and the encoding

zlib://

Compression Streams zlib: PHP 4.0.4 - PHP 4.2.3 (systems with fopencookie only) compress.zlib:// and compress.bzip2:// PHP 4.3.0 and up zlib: works like gzopen(), except that the stream can be used with fread() and the other filesystem functions. This is deprecated as of PHP 4.3.0 due to ambiguities with filenames containing ':' characters; use compress.zlib:// instead. compress.zlib:// and compress.bzip2:// are equivalent to gzopen() and bzopen() respectively,

php://

Accessing various I/O streams PHP provides a number of miscellaneous I/O streams that allow access to PHP's own input and output streams, the standard input, output and error file descriptors, in-memory and disk-backed temporary file streams, and filters that can manipulate other file resources as they are read from and written to. php://stdin, php://stdout and php://stderr php://stdin, php://stdout and php://stderr allow direct access to the corresponding inp

data://

Data (RFC 2397) The data: (» RFC 2397) stream wrapper is available since PHP 5.2.0. Examples: Print data:// contents <?php // prints "I love PHP" echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo='); ?> Fetch the media type <?php $fp   = fopen('data://text/plain;base64,', 'r'); $meta = stream_get_meta_data($fp); // prints "te

Context parameters

Context parameter listing These parameters can be set on a context using the stream_context_set_params() function.

MongoDB context options

MongoDB context option listing Context options for mongodb:// transports. Changelog: pecl/mongo 1.5.0 Added Write API Context options See also: Socket context options - SSL context options -

file://

Accessing local filesystem Filesystem is the default wrapper used with PHP and represents the local filesystem. When a relative path is specified (a path which does not begin with /, \, \\, or a Windows drive letter) the path provided will be applied against the current working directory. In many cases this is the directory in which the script resides unless it has been changed. Using the CLI sapi, this defaults to the directory from which the script was called.