PHP Wrappers¶
A wrapper is a custom way to access remote resources. It is designed to look like accessing to file, on the file system, but using other drivers than the ones of the hard drive. It is based on a configuration string, which looks like a URL: ftp://www.site.com/file.txt, where the part before the :// is the protocol.
Among the predefined PHP wrapper, there are http://, ftp://, zlib://, phar://, rar://, expect://.
<?php
$html = file_get_content('http://www.php.net/');
?>
See also Protocols and Wrapper in PHP and Php wrapper and Local File Inclusion.
Related : Protocol, Wrapper, file://, Thin Method, ftp://, Wrapper Pattern, php://, http://, zlib extension
Related packages : bovigo/vfsStream