Skip to content

Instantly share code, notes, and snippets.

@benhowes
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhowes/9f13a946b10d5acfba64 to your computer and use it in GitHub Desktop.
Save benhowes/9f13a946b10d5acfba64 to your computer and use it in GitHub Desktop.
Zapier Webhook posting
<?php
$params = array(
'name' => 'Erlich Bachman',
'email' => 'erl@pied-piper.io',
});
//send Zapier webhook
$response = drupal_http_request('https://zapier.com/hooks/catch/.../', array(
'headers' => array('Content-Type' => 'application/json', 'Accept' => 'application/json'),
'method' => 'POST',
'max_redirects' => 1,
'data' => drupal_json_encode($params),
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment