php whatsapp send message code example

Example 1: how to make a message for whatsapp in php

{
    "request": true,
    "response": true,
    "output": "Message Sent",
    "msg_sent_today": 1
}

Example 2: how to make a message for whatsapp in php

<?PHP
$token = ""; // PHPHive WhatsAPI Token, Get it from http://wapi.phphive.info
$wa_uid = ""; // WhatsApp Username
$wa_pwd = ""; // WhatsApp Password
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://wapi.phphive.info/api/message/receive.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"token=".$token."&wa_uid=".$wa_uid."&wa_pwd=".$wa_pwd);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
echo $server_output;
 
?>

Tags:

Php Example