afc_cgi_manager_set_cookie_domain

Name

afc_cgi_manager_set_cookie_domain  -- Set the cookies domain

Synopsis

int afc_cgi_manager_set_cookie_domain ( CGIManager * cgi_manager, char * domain );

Description

This function sets the new cookie domain. By default, a cookie can be read back only by the same site, but this sometimes is limitating. Suppose you have a bunch of sites, like: site1.somedomain.com, site2.somedomain.com, site3.somedomain.com and you set a cookie when the user is on site1. If it moves to site2, you will not be able to read back the cookie you set. That's where this function comes handy: you can set a sub-domain that will match all your sites, passing a string like ".somedomain.com", all sites belonging to somedomain.com will be able to read and set the same cookies.

Inputs

cgi_manager

Pointer to a valid afc_cgi_manager instance.

domain

Domain you want to set

Result

should return AFC_ERR_NO_ERROR

See Also