PHP Curl and Web-tocontact forms
We're trying to use PHP curl to submit to web-to-contact forms. Our code:
<?php
$zohovals = array();
$zohovals['xnQsjsdp'] = "xxxxxxx";
$zohovals['xmIwtLD'] = "xxxxxxxxxxxxx";
$zohovals['actionType'] = "xxxxxxxxxxx";
$zohovals['returnURL'] = "http://www.oursite.com/thank-you";
$zohovals['Lead Source'] = "Meet With Us";
$zohovals['First Name'] = $form_values['submitted_tree']['name'];
$zohovals['Last Name'] = $form_values['submitted_tree']['name'];
$zohovals['Email'] = $form_values['submitted_tree']['email'];
$zohovals['Phone'] = $form_values['submitted_tree']['phone_number'];
$zohovals['Company'] = $form_values['submitted_tree']['company'];
$zohovals['Description'] = "x";
$zohovals['save'] = "Save";
$url = "http://crm.zoho.com/crm/WebToContact";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $zohovals);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
?>
$form_values contains the user-submitted webform data. We are not seeing new contacts created in Zoho. Is this kind of operation possible?