(PECL pecl_http:0.10.0-1.5.5)
HttpRequest::addCookies — Add cookies
Add custom cookies.
Note: The request option encodecookies controls whether the cookie values should be urlencode()d.
Note: Affects any request method.
an associative array containing any cookie name/value pairs to add
Devuelve TRUE si todo se llevó a cabo correctamente, FALSE en caso de fallo.
Example#1 A HttpRequest::addCookies() example
<?php
$r = new HttpRequest;
$r->addCookies(
array(
"cookie_name" => "cookie value",
)
);
?>