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

search for in the

HttpRequest::addHeaders> <The HttpRequest
Last updated: Fri, 10 Oct 2008

view this page in

HttpRequest::addCookies

(PECL pecl_http:0.10.0-1.5.5)

HttpRequest::addCookiesAdd cookies

Описание

public bool HttpRequest::addCookies ( array $cookies )

Add custom cookies.

Замечание: The request option encodecookies controls whether the cookie values should be urlencode()d.

Замечание: Affects any request method.

Список параметров

cookies

an associative array containing any cookie name/value pairs to add

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Примеры

Пример #1 A HttpRequest::addCookies() example

<?php
$r 
= new HttpRequest;
$r->addCookies(
    array(
        
"cookie_name" => "cookie value",
    )
);
?>

Смотрите также



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

HttpRequest::addHeaders> <The HttpRequest
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites