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 -

Phar context options

Phar context option listing Context options for phar:// wrapper. See also: phar:// - Phar stream wrapper -

CURL context options

CURL context option listing CURL context options are available when the CURL extension was compiled using the --with-curlwrappers configure option. Examples: Fetch a page and send POST data <?php $postdata = http_build_query(     array(         'var1' => 'some content',         'var2' => 'doh'     ) ); $opts = array('http' =>     array(         'method'  => 'PO

SSL context options

SSL context option listing Context options for ssl:// and tls:// transports. Changelog: 5.6.0 Added peer_fingerprint and verify_peer_name. verify_peer default changed to TRUE. 5.4.13 Added disable_compression. Requires OpenSSL >= 1.0.0. 5.3.2 Added SNI_enabled and SNI_server_name. 5.0.0 Added capture_peer_cert, capture_peer_chain

FTP context options

FTP context option listing Context options for ftp:// and ftps:// transports. Changelog: 5.1.0 Added proxy. 5.0.0 Added overwrite and resume_pos. Notes: Underlying socket stream context options Additional context options may be supported by the underlying transport For ftp:// streams, refer to context options for the tcp:// transport. For ft

HTTP context options

HTTP context option listing Context options for http:// and https:// transports. Changelog: 5.3.4 Added follow_location. 5.3.0 The protocol_version supports chunked transfer decoding when set to 1.1. 5.2.10 Added ignore_errors. 5.2.10 The header can now be an numerically indexed array. 5.2.1 Added timeout.

Socket context options

Socket context option listing Socket context options are available for all wrappers that work over sockets, like tcp, http and ftp. Changelog: 5.3.3 Added backlog. 5.1.0 Added bindto. Examples: Basic bindto usage example <?php // connect to the internet using the '192.168.0.100' IP $opts = array(     'socket' =&

$argv

(PHP 4, PHP 5, PHP 7) Array of arguments passed to script Contains an array of all the arguments passed to the script when running from the command line. Note: The first argument $argv[0] is always the name that was used to run the script. Note: This variable is not available when register_argc_argv is disabled. Examples: $argv example <?php var_du

$argc

(PHP 4, PHP 5, PHP 7) The number of arguments passed to script Contains the number of arguments passed to the current script when running from the command line. Note: The script's filename is always passed as an argument to the script, therefore the minimum value of $argc is 1. Note: This variable is not available when register_argc_argv is disabled. Examples: $arg