Sign Up

welcome

Already have an account? Sign In

Sign In

welcome

Sign Up
Login with Google

Don't have account, Sign Up Here
Sign In Sign Up

letsrectify

letsrectify
  • Home
  • About Us
  • Contact Us
  • Jobs
Ask a Question
  • Questions & Answers

Questions & Answers

aman
Asked: 18-01-22
Answer

whatsapp API Integration with website

  • 6

 public static function WhtasappNotifications($number,$message)

       {  

        $numbers = $number;

           foreach ($numbers as $key => $number) {

               

               $data = [

                   'phone' => $number, // Receivers phone

                   'message' => $message, // Message

               ];

 

               $json = json_encode($data); // Encode data to JSON

               

               $token = 'Add your token'; //for exp: 6fe7edcadf066690e8090

               $instanceId = 'Add instance id'; //for exp: 331E661FFC

 

                $url = 'https://app.wappapi.in/api/send.php?number='.$number.'&type=text&message='.str_replace(' ', '%20',$data['message']).'&instance_id='.$instanceId.'&access_token='.$token;

 

               $options = stream_context_create(['http' => [

                       'method'  => 'POST',

                       'header'  => 'Content-type: application/json',

                       'content' => $json

                   ]

               ]);

               // Send a request

               $result = file_get_contents($url, false, $options);

           }

           return true;

       }

Share
  • Facebook
  • ‹
  • 1
  • 2
  • ...
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • ›
Ask A Question
  • whatsapp API Integration with website

    • 7 Answers
letsrectify

Categories

  • Technology
  • Food
  • Health
  • Sports
  • Science
  • Politics
  • Marketing

Policies

  • Terms & Conditions
  • Privacy Policy

About Us

  • About Us
  • Contact Us
  • Feedback

© 2025 All Rights Reserved by
Letsrectify.com