PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function f($number, $message) { $curl = curl_init(); $access_token = "{YOUR_ACCESS_TOKEN}"; $instance_id = "{INSTANCE_ID}"; $type = "text"; curl_setopt_array($curl, [ CURLOPT_URL => "https://dash.sentwa.com/api/send.php?access_token=" . $access_token . "&instance_id=" . $instance_id . "&message=" . $message . "&number=" . $number . "&type=" . $type, 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", ]); $response = curl_exec($curl); curl_close($curl); } $message = "{MESSAGE}"; $numbers = ['91999999999','918888888888','917777777777']; foreach ($numbers as $number) { echo f($number, $message); }
Show:  
Copy Clear