HttpRequest::addCookies
(PECL pecl_http >= 0.10.0)
HttpRequest::addCookies — Add cookies
Beschreibung
public
bool HttpRequest::addCookies
( array
$cookies
)Add custom cookies.
Hinweis: Die Request-Option encodecookies legt fest, ob der Cookie-Wert mit urlencode() kodiert werden soll..
Hinweis: Beeinflusst alle Requestmethoden.
Parameter-Liste
-
cookies -
an associative array containing any cookie name/value pairs to add
Rückgabewerte
Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.
Beispiele
Beispiel #1 A HttpRequest::addCookies() example
<?php
$r = new HttpRequest;
$r->addCookies(
array(
"cookie_name" => "cookie value",
)
);
?>
There are no user contributed notes for this page.
