downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

HttpRequest::addHeaders> <HttpRequest
[edit] Last updated: Fri, 17 May 2013

view this page in

HttpRequest::addCookies

(PECL pecl_http >= 0.10.0)

HttpRequest::addCookiesAdd 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",
    )
);
?>

Siehe auch



add a note add a note User Contributed Notes HttpRequest::addCookies - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites