Skip to main content
Best answer

Send data from Zapier to PHP

  • July 19, 2022
  • 2 replies
  • 1236 views

Dear Community,

 

I want to receive data in Zapier from Facebook Lead Forms (Premium App). This is working fine so far.

Now I want Zapier to send these data to my PHP Webserver - so there should be a PHP-Script on my webserver listening for Zapiers data-messages.

Could you please give me a hint, or maybe even a working example, on how to do this?

I was able to find many community topics the other way around, by sending data from PHP to Zapier. But not in the direct I want: Zapier to PHP.

 

Thank you in advance,

Gerhard

Best answer by GetUWired

Hi @gerhard.reisinger 

First, you will need to set up your PHP script to handle the request from Zapier.. meaning you will have to host your script somewhere and configure it to handle incoming POST requests. You should read up on creating a basic PHP based API. Once you’ve configured your php script to handle a POST request you can send data using Webhooks by Zapier

 

<?php
if (isset($_POST['api_key']))
{
//Handle the authenticated request
}
else
{
//return an error
}
?>

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

GetUWired
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • Answer
  • July 19, 2022

Hi @gerhard.reisinger 

First, you will need to set up your PHP script to handle the request from Zapier.. meaning you will have to host your script somewhere and configure it to handle incoming POST requests. You should read up on creating a basic PHP based API. Once you’ve configured your php script to handle a POST request you can send data using Webhooks by Zapier

 

<?php
if (isset($_POST['api_key']))
{
//Handle the authenticated request
}
else
{
//return an error
}
?>

 


Hi @gerhard.reisinger 

First, you will need to set up your PHP script to handle the request from Zapier.. meaning you will have to host your script somewhere and configure it to handle incoming POST requests. You should read up on creating a basic PHP based API. Once you’ve configured your php script to handle a POST request you can send data using Webhooks by Zapier

 

<?php
if (isset($_POST['api_key']))
{
//Handle the authenticated request
}
else
{
//return an error
}
?>

 

Thank You GetUWired! Your post gave me the final hint on how to do this!