title: How can scrape website via PHP that requires POST data?
body: <p>I'm trying to scrape a website that takes in POST data to return the correct page (sans POST it returns 15 results, with POST data it returns all results).</p>
  
  <p>Currently my code is looking like this:</p>
  
  <pre><code>$curl = curl_init();
  curl_setopt($curl,CURLOPT_URL,"http://www.thisismyurl.com/awesome");
  curl_setopt($curl, CURLOPT_POST, true);
  curl_setopt($curl, CURLOPT_POSTFIELDS, XXXXXX);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  $result= curl_exec($curl);
  </code></pre>
  
  <p>I know that I need to put my postfields into the space filled with "XXXXXX", I just don't know where to dig up the post fields/values and how to structure them into the variable that I pass into there.</p>
  
  <p>Any help would be greatly appreciated!</p>