X

Integrasi sitejet form dengan whacenter

kirim pesan WA setelah isi form di site builder

Script PHP contoh

<?php
$data_raw = file_get_contents('php://input');
$data_array = [];
parse_str($data_raw, $data_array);

$decoded_data = json_decode($data_array['data'], true);
$first_name = $decoded_data['First Name'] ?? 'N/A';
$last_name = $decoded_data['Last Name'] ?? 'N/A';
$email = $decoded_data['Email'] ?? 'N/A';
$company = $decoded_data['Company Name'] ?? 'N/A';
//$website = $decoded_data['Website'] ?? 'N/A';
$nohp = '085640206067';

$pesan= 'Ada input form baru
First name :'.$first_name.' 
last name :'.$last_name.' 
Email :'.$email.'
No WA :'.$nohp.'
company :'.$company.'
ini dikirim dari webhook';

$deviceid = 'xxx'; // ganti dengan device id anda

$url = 'https://app.whacenter.com/api/send';

$ch = curl_init($url);

$data = array(
    'device_id' => $deviceid,
    'number' => $nohp,
    'message' => $pesan,
);
$payload = $data;
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Categories: whacenter whatsapp
Tags: whatsapp
adikiss: i'm just an ordinary person | Direktur PT. Adya Global Media | Telegram : <a href="https://t.me/adikiss">t.me/adikiss</a> | Whatsapp : <a href="https://wa.me/6285640206067">wa.me/6285640206067</a> | Facebook : <a href="https://fb.me/adikiswanto">fb.me/adikiswanto</a>
Related Post
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings