CGI::Cookie

Provides an interface to Netscape (HTTP/1.1) cookies that can be used in conjunction with CGI.pm or independently. To use CGI::Cookie, create a new cookie object with the constructor new. You can then send the cookie to the browser in one of the following ways:

  • From a CGI script, create a Set-Cookie field in the HTTP header for each cookie you want to send ($c is the cookie object):

    print "Set-Cookie: $c0";
  • With CGI.pm (see Chapter 10), use the header method with a -cookie argument:

    print header(-cookie=>$c);
  • Using mod_perl (see Chapter 11), use the request object’s header_out method:

    $r->header_out('Set-Cookie',$c);

    The following methods are provided for CGI::Cookie.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.15.161