PHP Doku:: Add cookies - function.httprequest-addcookies.html

Verlauf / Chronik / History: (3) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteHTTPThe HttpRequestHttpRequest::addCookies

Ein Service von Reinhard Neidl - Webprogrammierung.

The HttpRequest

<<The HttpRequest

HttpRequest::addHeaders>>

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


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)