title: cURL cookiejar line commented out with #HttpOnly_?
body: <p>I'm trying to login to a PunBB forum from a different page on the same domain using cURL.</p>
  
  <p>When logging in, cURL gets executed and its initial response is the 'successful login' page of the forum. However no cookie got set thus when clicking any link in that forum, and I'm logged out.</p>
  
  <p>After a bit of investigating my cookiejar file mentions the cookie needed to login. If I create this cookie and its value manually inb my browser, I am successfully logged in and all is well. So the cookie value stored is correct.</p>
  
  <p>The line containing my cookie name/value in the cookiejar is however commented out.</p>
  
  <p>first question: Why?
  second: How to prevent that behavior?</p>
  
  <p>Here's my cookiejar:</p>
  
  <pre><code># Netscape HTTP Cookie File
  # http://curl.haxx.se/rfc/cookie_spec.html
  # This file was generated by libcurl! Edit at your own risk.
  
  www.example.com FALSE   /   FALSE   0   PHPSESSID   3d7oe6vt3blv3vs3ea94nljcs7
  #HttpOnly_www.example.com   FALSE   /   FALSE   1340974408  forum_cookie_e19209 MnwyYWQ4OGViNDI2NjE5MWEwMGZiNGZkNDFmZDY5ZDZhYjM5OTA5NDVjfDEzNDA5NzQ0MDh8OTU0NTExOGZhNWNlNGY5OGMzZDk3MmE0NDlmMWRjNzM3ZjI1NzMxOA%3D%3D
  </code></pre>
  
  <p>And here's my curl call:</p>
  
  <pre><code>function forumLogin() {
      $loginFields = array('req_username' =&gt; $_REQUEST['username']
                          ,'req_password' =&gt; $_REQUEST['password']
                          ,'form_sent' =&gt; "1"
                      ); //and so on
      $login = getUrl('http://www.example.com/manager/forum/login.php', 'post', $loginFields);
     return $login;
  }
  
  function getUrl($url, $method='', $vars='') 
  {
    $ch = curl_init();
    if ($method == 'post') {
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
    }
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
    curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
      $buffer = curl_exec($ch);
    curl_close($ch);
    return $buffer;
  }
  
  // successful login so reset fail count and update key values
  if(isset($_SESSION['mgrValidated'])) {
      $sql = "update $dbase.`".$table_prefix."user_attributes` SET failedlogincount=0, logincount=logincount+1, lastlogin=thislogin, thislogin=".time().", sessionid='$currentsessionid' where internalKey=$internalKey";
      $rs = mysql_query($sql);
      var_dump( forumLogin() );
  }
  exit;
  </code></pre>