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

search for in the

HttpRequest::addHeaders> <HttpRequest
Last updated: Sun, 25 Nov 2007

view this page in

HttpRequest::addCookies

(PECL pecl_http:0.10.0-1.5.5)

HttpRequest::addCookies — Add cookies

Popis

public bool HttpRequest::addCookies ( array $cookies )

Add custom cookies.

Note: The request option encodecookies controls whether the cookie values should be urlencode()d.

Note: Affects any request method.

Parametre

cookies

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

Vrátené hodnoty

Vracia TRUE pri úspechu alebe FALSE pri chybe.

Príklady

Example#1 A HttpRequest::addCookies() example

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

Tiež pozri

  • HttpRequest::setCookies()



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

HttpRequest::addHeaders> <HttpRequest
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites