1{
2 "request": true,
3 "response": [
4 {
5 "mynumber": "WhatsApp Username",
6 "fromNo": "XXXXXXXXXX",
7 "fromName": "Puneet Mehta",
8 "msgId": "D799FF10BED49CD9F9",
9 "msgType": "text",
10 "msgTime": "1469001844",
11 "msg": "Hey"
12 },
13 {
14 "mynumber": "WhatsApp Username",
15 "fromNo": "XXXXXXXXX",
16 "fromName": "Puneet Mehta",
17 "msgId": "3510107294D97960F0",
18 "msgType": "text",
19 "msgTime": "1469001844",
20 "msg": "Hi"
21 }
22 ]
23}
24
1{
2 "request": true,
3 "response": true,
4 "output": "Message Sent",
5 "msg_sent_today": 1
6}
7
1<?PHP
2$token = ""; // PHPHive WhatsAPI Token, Get it from http://wapi.phphive.info
3$wa_uid = ""; // WhatsApp Username
4$wa_pwd = ""; // WhatsApp Password
5
6$ch = curl_init();
7curl_setopt($ch, CURLOPT_URL,"http://wapi.phphive.info/api/message/receive.php");
8curl_setopt($ch, CURLOPT_POST, 1);
9curl_setopt($ch, CURLOPT_POSTFIELDS,"token=".$token."&wa_uid=".$wa_uid."&wa_pwd=".$wa_pwd);
10curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
11$server_output = curl_exec ($ch);
12curl_close ($ch);
13echo $server_output;
14
15?>
16
1<?PHP
2$token = ""; // PHPHive WhatsAPI Token, Get it from http://wapi.phphive.info
3$wa_uid = ""; // WhatsApp Username
4$wa_pwd = ""; // WhatsApp Password
5$wa_recp = ""; // Recipient
6$wa_msg = ""; // Message You want to Send
7
8$ch = curl_init();
9curl_setopt($ch, CURLOPT_URL,"http://wapi.phphive.info/api/message/send.php");
10curl_setopt($ch, CURLOPT_POST, 1);
11curl_setopt($ch, CURLOPT_POSTFIELDS,"token=".$token."&wa_uid=".$wa_uid."&wa_pwd=".$wa_pwd."&wa_recp=".$wa_recp."&wa_msg=".urlencode($wa_msg));
12curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
13$server_output = curl_exec ($ch);
14curl_close ($ch);
15echo $server_output;
16
17?>
18