title: how to set cookie in zend framework?
body: <p>I am trying to use Zend Framework to set a cookie but I don't understand how it works.</p>
  
  <pre><code>$cookie = md5("_somerandomstring_");
  
  Zend_Loader::loadClass("Zend_Http_Client");
  
  require_once "Zend/Http/Cookie.php";
  
  $client = new Zend_Http_Client();
  
  $cookie = new Zend_Http_Cookie('foo', $cookie, '.mydomain.com', time()+7200, '/path');
  
  $client-&gt;setCookieJar();
  $client-&gt;setCookie($cookie);
  </code></pre>
  
  <p>How can I set the <code>.mydomain.com</code> when I am run my site on <code>localhost</code>?</p>