title: How to send a get form and receive the data
body: <p>Okay I am actually working as a pentester for a company i found that there's an error in there website which they generate csrf tokens due to get request to this page <code>localhost/csrf-token</code> and give out the csrf tokens in unencrypted text
  To get the right csrf token the cookies of the user need to be sent with the request 
  I tried using curl in my POC to get the result of the request which is the token
  but the cookies wasn't sent with the request
  I found out that the only way that the request might get sent into is using a normal form but i can't get its result 
  The curl code</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://localhost/csrf-token");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  
  
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'X-Requested-With: XMLHttpRequest'
  ));
  $output = curl_exec ($ch);
  curl_close ($ch);
  echo $output;
  </code></pre>
  
  <p>The normal get request that I want to use is</p>
  
  <pre><code>&lt;form action="localhost/csrf-token" method="get"&gt;
  &lt;input type="submit" name="submit" value="send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my question here is how to get the result of the second code snippet</p>