<doc>
	<legacy_id></legacy_id>
	<name>put cookie</name>
	<type>command</type>

	<syntax>
		<example>put [secure] [httponly] cookie <i>&lt;name&gt;</i> [for <i>&lt;path&gt;</i>] [on <i>&lt;domain&gt;</i>] with <i>&lt;value&gt;</i> [until <i>&lt;expires&gt;</i>]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Sets a cookie in a visiting browser for a given URL.</summary>

	<examples>
<example>put cookie &quot;testcookie1&quot; with &quot;some cookie value&quot;</example>
<example><p>-- Expires in 1 year</p><p>put cookie &quot;testcookie2&quot; with &quot;some cookie value&quot; until (the seconds + 60 * 60 * 24 * 365) </p></example>
<example><p>-- Cookie available across whole website</p><p>put cookie &quot;testcookie3&quot; for &quot;/&quot; on &quot;www.runrev.com&quot; with &quot;some cookie value&quot;</p></example>
<example><p>-- Cookie available to specific pages</p><p>put cookie &quot;testcookie4&quot; for &quot;/products/&quot; on &quot;www.runrev.com&quot; with &quot;some cookie value&quot; until (the seconds + 60 * 60 * 24 * 365)</p></example>
<example>put secure httponly cookie &quot;testcookie4&quot; for &quot;/products/&quot; on &quot;www.runrev.com&quot; with &quot;some cookie value&quot; until (the seconds + 60 * 60 * 24 * 365)</example>
	</examples>

	<history>
		<introduced version="4.6.4">Added</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<server/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<keyword tag="$_COOKIE">$_COOKIE Keyword</keyword>
	</references>

	<description>
	<overview>Use the <b>put cookie</b> command to create a cookie with the given data in the visiting browser for a specific URL.</overview>

		<parameters>
  <parameter>
    <name>secure</name>
    <description>An optional value. If present, the browser only sends the cookie if communicating over a secure connection (https).</description>
  </parameter>
  <parameter>
    <name>httponly</name>
    <description>An optional value. If present, the cookie is only available from the browser when communicating with the server and hidden from client-side scripting (for example JavaScript).</description>
  </parameter>
  <parameter>
    <name>name</name>
    <description>A String containing the name by which the cookie is identified.</description>
  </parameter>
  <parameter>
    <name>path</name>
    <description>A string containing the path on the server at which the cookie is available. If a path is not specified, then the containing folder of the current URL is used.</description>
  </parameter>
  <parameter>
    <name>domain</name>
    <description>A string containing the domain at which the cookie is available. If the domain is not specified, then the domain of the current URL is used.</description>
  </parameter>
  <parameter>
    <name>value</name>
    <description>A string containing the contents of the cookie. This is automatically URL encoded.</description>
  </parameter>
  <parameter>
    <name>expires</name>
    <description>A number containing the time at which the cookie expires. This is expressed in seconds since the UNIX epoch (midnight, January 1, 1970 GMT). If this is not specified or empty, the cookie expires when the client browser closes.</description>
  </parameter>		</parameters>

	<value></value>
	<comments>A cookie is used by a website to store state information in the user's browser, which is returned to the website on subsequent visits. Cookies are often used to store user preferences and session data. For example, you may allow a user to choose a theme through which to view your website and store this choice in a cookie to be used on subsequent visits.<p></p><p>When setting a cookie you can specify a path. Cookies are returned to all URLs within the specified path. For example, a cookie set on the domain &quot;www.runrev.com&quot; with the following path:</p><p></p><p><i>/products/</i></p><p></p><p>Is available to all pages within and under http://www.runrev.com/products/</p><p></p><p>To make the cookie available across your entire website, set the path to: &quot;/&quot;</p><p></p><p></p><note>Cookies must be set before any headers are sent.</note></comments>
	</description>
</doc>