Malhar Lathkar has Published 189 Answers

PHP compression Stream Wrappers

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:51:29

IntroductionIn PHP, zlib://, bzip2:// and zip:// represent wrappers for respective compression streams.compress:zlib://This works similar to gzopen() function, however, it can be used with filesystem functions like fread() and others.compress://bzip2This is similar to bzopen() function. Both stream wrappers operate even on systems not capable of supporting fopencookie.zip://The ZIP extension registers this ... Read More

PHP ssh2://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:50:15

IntroductionThe libssh2 library provides access to resources on a remote machine using a secure cryptographic transport. These are shell, remote exec, tunneling, file transfer and SCP. PHP has wrappers for these resources. They are ssh2.shell://, ssh2.exec://, ssh2.tunnel://, ssh2.sftp://, and ssh2.scp:// respectivelyNote that these wrappers are not enabled by default. SSH2 extension available ... Read More

PHP rar://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:48:58

IntroductionThe RAR (Roshal Archive) is file compression format that supports error recovery and file spanning. PHP supports use of .RAR files as IO stream. The rar:// is a stream wrapper for RAR streams.rar:// wrapper takes the relative or absolute url encoded path to the RAR archive. An optional (*), or ... Read More

PHP php://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:47:26

IntroductionThe php://wrapper enableaccess to various I/O streams. This includes standard input, output and error streams. In-memory, disk backed and filtered streams are lso accessed with php:// protocol.Standard streamsphp://stdin, php://stdout and php://stderr allow direct access to standard input stream device, standard output stream and error stream to a PHP process respectively. Predefined ... Read More

PHP phar://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:45:40

IntroductionThe phar:// stream wrapper is available in all PHP versions after 5.3.0. Phar stands for PHP Archive. It is used to distribute PHP application or library and is executed as a normal PHP file. The phar:// wrapper supports opening file with fopen() for read/write, rename, and directory stream operations opendir() as well ... Read More

PHP http://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:44:14

IntroductionThe http:// and https:// wrappers enable read only access to resources and files through HTTP procol. When handling virtual name-based host,  host: header is also sent along with user_agent (if configured in php.ini)The http header information is stored in $http_response_header variable. These headers have to be processed to know URL of resource where ... Read More

PHP glob://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:42:23

IntroductionThe glob:// stream wrapper is available in all PHP versions after 5.3.0. It finds pathnames that match given pattern. Similar purpose is fulfilled by PHP's filesystem function glob() which follows libc glob() rules.ParametersSpecial characters* − Matches zero or more characters.? − Matches exactly one character (any character).[...] − Matches one ... Read More

PHP ftp://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:40:15

IntroductionBoth ftp:// and  ftps:// wrappers allow read access to URLs with ftp (and ftps) protocol. New file can also be created using these wrappers. If passive mode ftp support is not possible in the server, connection will fail.Simultaneous read-write operations are not permitted with streams using ftp protocol. If it is ... Read More

PHP file://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:39:17

IntroductionVarious URL-style protocols can be used with filesystem functions with the help of corresponding built-in wrappers avalable in PHP. The stream_wrapper_register() function is also there to define custom wrapper.Default wrapper in PHP is file:// and it represents local filesystem. If no other protocol is explicitly used, PHP parser treats it as ... Read More

PHP data://

Malhar Lathkar

Malhar Lathkar

Updated on 22-Sep-2020 10:37:59

IntroductionThe data URI scheme has been defined in RFC 2397, published in 1998. It provides a mechanism to include in-line data in web page as if it is an external resource. PHP provides data:// wrapper for data URI representation. The data URI is represented as per following syntaxdata:// syntaxdata:[media type][;base64], ... Read More

1 2 3 4 5 6 7 ... 19 Next
Advertisements