stream_context_set_params

Set parameters for a stream/wrapper/context

Syntax

stream_context_set_params ( resource $stream_or_context , array $params ) : bool

Parameters

stream_or_context

The stream or context to apply the parameters too.

params

An array of parameters to set.

Note: params should be an associative array of the structure: $params['paramname'] = "paramvalue";.

Return

Returns TRUE on success or FALSE on failure.

Examples

<?

$stream_or_context = stream_context_create();
$params = array("notification" => "stream_notification_callback");

$return = stream_context_set_params($stream_or_context, $params);

print_r($return);

?>
1

PHP

Home Menu