title: I receive a HTML form response from cURL request
body: <p>I am trying to connect with an external server for a job.  However, I am confused as to how to proceed.  I have the following code:</p>
  
  <pre><code>$username = '****';
  $password = '****';
  $ch = curl_init(); 
  curl_setopt($ch, CURLOPT_URL, 'https://****:9443/submitorder'); 
  curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/xml"));
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,  2);
  $result = curl_exec($ch); 
  echo $result;
  </code></pre>
  
  <p>And when I <code>echo $result</code> now, I get a HTML Form:</p>
  
  <p><img src="https://i.stack.imgur.com/fIC5a.jpg" alt="This is the &lt;code&gt;$results&lt;/code&gt; I get back from the cURL request:"></p>
  
  <p>How am I supposed to POST to that form using cURL? I need to upload a custom XML script to it, but as I understood cURL, everything was done using one request.  You connected, uploaded, and received a response all in one request.  How do I get my data into this server?</p>
  
  <p>The HTML I receive back in <code>$result</code> is the following:</p>
  
  <p><code>&lt;form enctype="multipart/form-data" method="post"&gt;
  XML Order Envolope File: &lt;input name="filename" type="file"&gt;
  &lt;input type="submit" value="Send"&gt;
  &lt;/form&gt;</code></p>