title: Fill out a form automatically using curl and php
body: <p>I am trying to write a script that fills out forms automatically and then automatically presses the submit button.</p>
  
  <p>I have read that you can use curl to post HTTP requests, but what do you do when the form handles the post request with JavaScript, like the code below?</p>
  
  <pre><code>&lt;form name="myform" action="javascript:void(0)" method="POST" onsubmit="return fancy_function(this)"&gt;
  </code></pre>