title: Laravel Post Request Login by Curl
body: <p>I'm renting a service(elaborated on Laravel), but he don't have functionality what I need.
  And I need to elaborate a parser.
  I'm trying to authenticate by curl, but I get a error "TokenMismatchException".</p>
  
  <p>how can i solve this problem ?</p>
  
  <pre><code>$laravelLoginUrl = 'http://.../login';
  
  $token = '...';
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $laravelLoginUrl);
  curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (X11; Linux x86_64) 
  AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.107 
  Chrome/32.0.1700.107 Safari/537.36');
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, 
  "email=...&amp;password=&gt;...&amp;_token=" . $token);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'X-CSRF-TOKEN: ' . $token,
  ));
  curl_setopt($ch, CURLOPT_COOKIESESSION, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'X-CSRF-TOKEN: ' . $token,
  ));
  $answer = curl_exec($ch);
  echo $answer;
  </code></pre>