Update my code from API v1 to v2
Hi guys
Ive got a simple form that when submitted inserts the form values into Zoho. The Zoho code is very simple:
- $curl_connection = curl_init('https://crm.zoho.com/crm/WebToLeadForm');
- curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
- curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
- $post_data['xnQsjsdp'] = '3e096710fcca7d9cf25421fef7a9edb67c05bd02cff63dda8de45923ec970c65';
- $post_data['zc_gad'] = '';
- $post_data['xmIwtLD'] = 'e26d36527a992b9497c415f16b4a6b71a7ebc453a2c829f127da2d57f7b2c299';
- $post_data['actionType'] = 'TGVhZHM=';
- $post_data['Email'] = "test@test.com";
- $post_data['Phone'] = "1234";
- $post_data['Company'] = "tester";
- foreach ( $post_data as $key => $value){
- $post_items[] = $key . '=' . $value;
- }
- $post_string = implode ('&', $post_items);
- curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
- $result = curl_exec($curl_connection);
- curl_close($curl_connection);
What would the above be using the API v2 ?
Thanks