How to send Bulk Message on Whatsapp using PHP
In this article, We will learn how to send message on whatsapp using php. RC PANEL WHATS API offers lots of features like Unlimited Message, Bulk Message, Access Chat, Access Group List, Unlimited Templates, Chat Bot etc. You can go to their official website https://whats-api.rcsoft.in/
Step 1: Create a Account on RC Panel, you need to create a account to send message.
Step 2: Connect Your Device to RC Panel
Step 3: Go to my app section and create app. Just Simple Put name and website link to proceed. Now you will get developer integration/API.
<?php //database connection $con = mysqli_connect('localhost','root','','whatsapp_api'); //get user list $query="select * from users"; $fire=mysqli_query($con,$query); while($row=mysqli_fetch_assoc($fire)){ $msg = "Dear ".$row['name'].'. Welcome to player of code. For more detail you can visit us on : https://playerofcode.in'; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://whats-api.rcsoft.in/api/create-message', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'appkey' => 'xxxxxxxxxxxxxxxx', 'authkey' => 'xxxxxxxxxxxxxxx', 'to' => $row['mobno'], 'message' => $msg, 'sandbox' => 'false' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; } ?>