Is there any reason why this would not be setting a cookie? The code
doesn't generate any errors. It just doesn't set a cookie. If I put
in setcookie('name', 'value'), that will work.
$cookie = md5($username . $id . "_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->setCookieJar();
$client->setCookie($cookie);
The code above raises a side question. I don't want to get
sidetracked. But, I guess I'll ask it now, what's the difference
between require_once and Zend_Loader::loadClass?
TIA,
Darren