Send and Receive WhatsApp messages using PHP Steps

Send and Receive WhatsApp messages using PHP Steps

In this Post We Will Explain About is Send and Receive WhatsApp messages using PHP Steps With Example and Demo.Welcome on infinityknow.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to PHP Script to send and receive messages on WhatsAppExample

In this post we will show you Best way to implement How to send message from WhatsApp in PHP with WhatsAPI,, hear for Send and Receive WhatsApp messages using PHPwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

simple step by step send and Receive live Whats-Application wp – message using PHP – This post shell explain how from send and receive whatsapp wp – message using php. And then my have learn the full of techniques from send the whatsapp wp – message. my get by from sync Contacts with live Whats-Application Server from simple step by step send whatsapp wp – message from those Numbers. Note : If my try from simple step by step send whatsapp wp – message without Syncing Contacts , my live Whats-Application may Get BLOCKED.

And then, we need two objects from execute the script so just get the link and learn full thing from run the script. Below i have perfect provide the requirements link so just see and go on the link from execute it.

simple step by step send and Receive live Whats-Application wp – message using PHP

in this post this post my shell see How from simple step by step send and Receive whatsapp wp – message in live Whats-Application using PHP. Syncing Contacts is an in this postitial & even Required phase. my get by from sync Contacts with live Whats-Application Server from simple step by step send whatsapp wp – message.

READ :  Vuejs UI Grid Component Sorting Filtering Paging Grouping

Prerequisite

There are two prerequisite there from execute the script. They are,
1. PHPHive live Whats-Application infinityknow.com RESTAPI Token
Click here from get the fromken infinityknow.com live Whats-Application API Token.
2. live Whats-Application infinityknow.com Password
Just refer this link from get the password Get infinityknow.com live Whats-Application Password

Code for simple step by step send the wp – message

And then, we have perfect provide infinityknow.com the full code from send whatsapp infinityknow.com wp – message in someone’s using PHP.


Given the Sample Output (simple step by step send message)

This is sample results for above infinityknow.com code from send the wp – message.

{
    "request": true,
    "response": true,
    "results": "whatsapp message Sent",
    "comments_sent_fromday": 1
}

{
    "request": true,
    "response": true,
    "results": "whatsapp message Sent",
    "comments_sent_fromday": 1
}

Code for Receive the wp – message

And then, we have perfect provide the full code from receive whatsappinfinityknow.com wp – message in someone’s using PHP.


Given the Sample Output (Receive message)

This is sample results for above code from send the wp – message.

{
    "request": true,
    "response": [
        {
            "mynumber": "live Whats-Application Username",
            "fromNo": "simplehereput my number",
            "fromName": "infinityknow.com",
            "commentsId": "sdsdsdd323f2d3f4ddsfd",
            "commentsType": "text",
            "commentsTime": "98985555555",
            "comments": "Hey"
        },
        {
            "mynumber": "live Whats-Application Username",
            "fromNo": "98985555555",
            "fromName": "infinityknow.com",
            "commentsId": "3510107294D97960F0",
            "commentsType": "text",
            "commentsTime": "98985555555",
            "comments": "Hi"
        }
    ]
}

{
    "request": true,
    "response": [
        {
            "mynumber": "live Whats-Application Username",
            "fromNo": "simplehereput my number",
            "fromName": "infinityknow.com",
            "commentsId": "sdsdsdd323f2d3f4ddsfd",
            "commentsType": "text",
            "commentsTime": "98985555555",
            "comments": "infinityknow24u"
        },
        {
            "mynumber": "live Whats-Application Username",
            "fromNo": "98985555555",
            "fromName": "infinityknow.com",
            "commentsId": "3510107294D97960F0",
            "commentsType": "text",
            "commentsTime": "98985555555",
            "comments": "infinityknow24u"
        }
    ]
}

There’s mo_number daily limits from send and receive wp – message. But infinityknow.com is obviously mo_numbert allowed. We are keeping records of IP’s, if we find someone infinityknow.com our service then that IP shell be Banned.

READ :  C# Armstrong Number Tutorial with Examples

Prerequisite’s infinityknow.com for Syncing Contacts in live Whats-Application

1. WhatsAPI PHP Library.
2. WA Password.(infinityknow.com)
3. PHP Profrombuf and Curve25519 from enable end from end encryption.
If my dont have WA Password, just refer this POST Get WhataApp Password
If my haven’t download WhatsAPI PHP infinityknow.com Library, so download it mo_numberw as we going from use in the Process of obtaining WA Password.

Click from download
Logging on live Whats-Application

in this postclude the php main libs file and save the code.

require_once("src/whatsprot.class.php");

$my_user_name = ""; //infinityknow.com Username
$password = ""; //infinityknow.com Password

$whapp = new WhatsProt($my_user_name, "live Whats-Application", true);

try {
$whapp->connect();
$whapp->loginWithPassword($password);
  } catch(Exception $e) {
    echo "ERROR : Login Failed";
    exit(0);
}

require_once("src/whatsprot.class.php");
 
$my_user_name = ""; //infinityknow.com Username
$password = ""; //infinityknow.com Password
 
$whapp = new WhatsProt($my_user_name, "live Whats-Application", true);
 
try {
$whapp->connect();
$whapp->loginWithPassword($password);
  } catch(Exception $e) {
    echo "ERROR : Login Failed";
    exit(0);
}

simple step by step send the wp – message
infinityknow.com
And then, the full code of send the wp – message.

$mo_number=""; //infinityknow.com -  Number
$comments=""; //infinityknow.com whatsapp message

try {
      $whapp->sendwhatsapp message($mo_number, $comments);
      echo 'Text whatsapp message Sent';
 } catch(Exception $e) {
      echo "ERROR : Text whatsapp message simple step by step sending Failed";
}

$mo_number=""; //infinityknow.com -  Number
$comments=""; //infinityknow.com whatsapp message
 
try {
      $whapp->sendwhatsapp message($mo_number, $comments);
      echo 'Text whatsapp message Sent';
 } catch(Exception $e) {
      echo "ERROR : Text whatsapp message simple step by step sending Failed";
}
<p>Receive the wp - message
And then, the full code of receive the wp - message</p>.

$whapp->eventManager()->bind("getwhatsappcomments", "getwhatsappcomments");


function getwhatsappcomments($mynumber, $from, $id, $type, $time, $name, $body) {
         echo 'whatsapp message Received';		
	 echo "DEBUG : getwhatsappcomments";
	 echo "mynumber : ".$mynumber.;
	 echo "from : ".$from.;
	 echo "id : ".$id.;
	 echo "type : ".$type.;
	 echo "name : ".$name.;
	 echo "body : ".$body.;
}

$whapp->eventManager()->bind("getwhatsappcomments", "getwhatsappcomments");
 

function getwhatsappcomments($mynumber, $from, $id, $type, $time, $name, $body) {
         echo 'whatsapp message Received';		
	 echo "DEBUG : getwhatsappcomments";
	 echo "mynumber : ".$mynumber.;
	 echo "from : ".$from.;
	 echo "id : ".$id.;
	 echo "type : ".$type.;
	 echo "name : ".$name.;
	 echo "body : ".$body.;
}

all the module code simple step by step send & Receive wp – message

READ :  Angular Interval Service Example

And then, we perfect provide the all source code.

require_once 'src/whatsprot.class.php';

$my_user_name = ""; //infinityknow.com Username
$password = ""; //infinityknow.com Password

$numbers = array("98255555","98989898");


function onSyncResult($response)
{
    foreach ($response->existing as $number) {
        echo "$number exists";
    }
    foreach ($response->mo_numbernExisting as $number) {
        echo "$number does mo_numbert exist";
    }
    die(); //infinityknow.com from break out of the while(true) loop
}
$whapp = new WhatsProt($my_user_name, 'WA', false);

//infinityknow.com Bind Event getwhatsappcomments
$whapp->eventManager()->bind("getwhatsappcomments", "getwhatsappcomments");

try {
$whapp->connect();
$whapp->loginWithPassword($password);
  } catch(Exception $e) {
    echo "ERROR : simple Login Failed";
    exit(0);
}

$mo_number=""; //infinityknow.com Number
$comments=""; //infinityknow.com whatsapp message

try {
      $whapp->sendwhatsapp message($mo_number, $comments);
      echo 'Text whatsapp message Sent';
 } catch(Exception $e) {
      echo "ERROR : Text whatsapp message simple step by step sending Failed";
}


while ($whapp->pollwhatsapp message());


function getwhatsappcomments($mynumber, $from, $id, $type, $time, $name, $body) {
         echo 'whatsapp message Received';		
	 echo "DEBUG : getwhatsappcomments";
	 echo "mynumber : ".$mynumber.;
	 echo "from : ".$from.;
	 echo "id : ".$id.;
	 echo "type : ".$type.;
	 echo "name : ".$name.;
	 echo "body : ".$body.;
}

require_once 'src/whatsprot.class.php';
 
$my_user_name = ""; //infinityknow.com Username
$password = ""; //infinityknow.com Password
 
$numbers = array("98255555","98989898");
 

function onSyncResult($response)
{
    foreach ($response->existing as $number) {
        echo "$number exists";
    }
    foreach ($response->mo_numbernExisting as $number) {
        echo "$number does mo_numbert exist";
    }
    die(); //infinityknow.com from break out of the while(true) loop
}
$whapp = new WhatsProt($my_user_name, 'WA', false);
 
// infinityknow.com Bind Event getwhatsappcomments
$whapp->eventManager()->bind("getwhatsappcomments", "getwhatsappcomments");
 
try {
$whapp->connect();
$whapp->loginWithPassword($password);
  } catch(Exception $e) {
    echo "ERROR : simple infinityknow.com Login Failed";
    exit(0);
}
 
$mo_number=""; //infinityknow.com Number
$comments=""; //infinityknow.com whatsapp message
 
try {
      $whapp->sendwhatsapp message($mo_number, $comments);
      echo 'my live Text whatsapp message Sent';
 } catch(Exception $e) {
      echo "ERROR : infinityknow Text whatsapp message simple simple step by step sending Failed";
}
 

while ($whapp->pollwhatsapp message());
 

function getwhatsappcomments($mynumber, $from, $id, $type, $time, $name, $body) {
         echo 'infinityknow.com whatsapp message Received';		
	 echo "DEBUG : getwhatsappcomments";
	 echo "mynumber : ".$mynumber.;
	 echo "from : ".$from.;
	 echo "id : ".$id.;
	 echo "type : ".$type.;
	 echo "name : ".$name.;
	 echo "body : ".$body.;
}

Example

I hope you have Got What is Send Whatsapp Message Using PHP Whatsapp API And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.

Add a Comment

Your email address will not be published. Required fields are marked *