I need assistance with implementing a Zapier Webhook using the POST method from a PHP form.
I previously developed a solution that successfully sent data, but it has recently stopped functioning correctly. Could you offer some guidance on how to troubleshoot or improve this implementation?
Here’s a simplified code snippet to illustrate my current approach:
$data = array('name' => 'John Doe', 'email' => '[email protected]');
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'YOUR_WEBHOOK_URL');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_exec($curl);
curl_close($curl);