title: How to send WordPress form data via curl using POST?
body: <p>I need to insert the following code into POST using CURL:</p>
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, &quot;http://www.bmby.com/shared/AddClient/index.php&quot;);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_REFERER, 'http://xxxxxxxx/');
  
  $data = [
              'ProjectID' =&gt; xxxx
              'Password' =&gt; 'xxxxxx',
              'Fname' =&gt; $_POST['your-name'],
              'Email' =&gt; $_POST['email'],
              'Phone' =&gt; $_POST['your-tel'],
              #'Esse' =&gt; $_POST['msg'],
              'Referal' =&gt; 'http://xxxxxxxx/',
              'MediaTitle' =&gt; 'אתר אינטרנט ראשי',
              'AllowedMail' =&gt; 2, # 0 = allow, 2 = don't allow
              'IP' =&gt; $_SERVER['REMOTE_ADDR'],
  ];
  
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  $output = curl_exec($ch);
  </code></pre>
  <p>Any guidance on how to implement this and have the form that we created to relate to the above code so that the service we are using to gather all the leads from the form could get the required info.</p>