pak kacung Posted May 16 Share Posted May 16 On 6/18/2023 at 8:36 AM, app gpmp said: @Ardian Its not work Work..lancar Quote Link to comment Share on other sites More sharing options...
bloserda Posted May 16 Share Posted May 16 apakah ini bisa integrasi dengan google apps script? (google form/spreadsheet/code.gs) mungkin ada yang punya referensinya Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted May 16 Share Posted May 16 17 minutes ago, Bloserda BlogSerbaAda said: apakah ini bisa integrasi dengan google apps script? (google form/spreadsheet/code.gs) mungkin ada yang punya referensinya bisa, d yutup banyak tutorialnya 1 Quote Link to comment Share on other sites More sharing options...
bloserda Posted May 16 Share Posted May 16 @Gusik Prasetyo baik saya cari, maturnuwun mas Quote Link to comment Share on other sites More sharing options...
Archana Manna Posted May 17 Share Posted May 17 Good Quote Link to comment Share on other sites More sharing options...
sadat jigar Posted May 18 Share Posted May 18 @Mahmoud Sir Any Video Ya document available for installation Quote Link to comment Share on other sites More sharing options...
The Billionaire Posted May 18 Share Posted May 18 27 minutes ago, sadat jigar said: @Mahmoud Sir Any Video Ya document available for installation Quote Link to comment Share on other sites More sharing options...
sadat jigar Posted May 18 Share Posted May 18 @Mahmoud WhatsApp Connect Issue Auto Logout QR Scan After Please Solve This Issue Quote Link to comment Share on other sites More sharing options...
Enno Askrindo Posted May 21 Share Posted May 21 V 7 Please Update..hiks Quote Link to comment Share on other sites More sharing options...
Hugo Fernando Ochoa Posted May 21 Share Posted May 21 Hello, does anyone know how you can send a message using PHP something like a CURL? thank you Quote Link to comment Share on other sites More sharing options...
MarCoVar01 Posted May 21 Share Posted May 21 1 hour ago, Hugo Fernando Ochoa said: Hello, does anyone know how you can send a message using PHP something like a CURL? thank you @Hugo Fernando Ochoa quieres enviar un mensaje de correo con php, o hablar de usar la plataforma Whatsapp Gateway? Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted May 22 Share Posted May 22 3 hours ago, Hugo Fernando Ochoa said: Hello, does anyone know how you can send a message using PHP something like a CURL? thank you You can use my code: <?php function SendWhatsApp($sender_number, $api_key, $number, $text) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://yourwebsite.com/send-message?api_key='.$api_key.'&preview_url=true&sender='.$sender_number.'&number='.$number.'&message='.urlencode($text).''); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); $result = str_replace(" ", "", $result); if($result){ return $result; }else{ return ""; } } // "yournumber", "api key", "recierv number", "msg" echo SendWhatsApp("62888xxxx", "nknfkl345ksdfk4KLhk45", "6281xxxxxx", "Hello World"); ?> Quote Link to comment Share on other sites More sharing options...
sadat jigar Posted May 22 Share Posted May 22 WhatsApp Account Connect Issue Please Help How To Solve Quote Link to comment Share on other sites More sharing options...
The Billionaire Posted May 22 Share Posted May 22 7 hours ago, Magd Almuntaser said: You can use my code: <?php function SendWhatsApp($sender_number, $api_key, $number, $text) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://yourwebsite.com/send-message?api_key='.$api_key.'&preview_url=true&sender='.$sender_number.'&number='.$number.'&message='.urlencode($text).''); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); curl_close($ch); $result = str_replace(" ", "", $result); if($result){ return $result; }else{ return ""; } } // "yournumber", "api key", "recierv number", "msg" echo SendWhatsApp("62888xxxx", "nknfkl345ksdfk4KLhk45", "6281xxxxxx", "Hello World"); ?> this method is actually long Quote Link to comment Share on other sites More sharing options...
The Billionaire Posted May 22 Share Posted May 22 public function whatsApp($numbers, $message) { // Replace these values with your actual data $apiKey = env('WHATSAPP_API_KEY'); $sender = env('WHATSAPP_API_SENDER'); $url = env('WHATSAPP_API_URL'); // If $numbers is not an array, convert it to an array if (!is_array($numbers)) { $numbers = [$numbers]; } foreach ($numbers as $number) { try { $response = Http::post($url, [ "api_key" => $apiKey, "sender" => $sender, "number" => $number, "message" => $message ]); // Handle response if ($response->successful()) { // Success $responseData = $response->json(); Log::info("WhatsApp message sent successfully" . json_encode($responseData)); // Process $responseData here } else { // Failure $errorCode = $response->status(); $errorMessage = $response->body(); Log::error("Failed to send WhatsApp message. Error code: $errorCode, Error message: $errorMessage"); // Handle error } } catch (\Exception $e) { Log::error("Exception occurred while sending WhatsApp message" . $e->getMessage()); // Handle exception } } } try this, change the environment to fit yours, this code can send messages to multiple numbers, 20 numbers at once using the API Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted May 22 Share Posted May 22 1 hour ago, The Billionaire said: public function whatsApp($numbers, $message) { // Replace these values with your actual data $apiKey = env('WHATSAPP_API_KEY'); $sender = env('WHATSAPP_API_SENDER'); $url = env('WHATSAPP_API_URL'); // If $numbers is not an array, convert it to an array if (!is_array($numbers)) { $numbers = [$numbers]; } foreach ($numbers as $number) { try { $response = Http::post($url, [ "api_key" => $apiKey, "sender" => $sender, "number" => $number, "message" => $message ]); // Handle response if ($response->successful()) { // Success $responseData = $response->json(); Log::info("WhatsApp message sent successfully" . json_encode($responseData)); // Process $responseData here } else { // Failure $errorCode = $response->status(); $errorMessage = $response->body(); Log::error("Failed to send WhatsApp message. Error code: $errorCode, Error message: $errorMessage"); // Handle error } } catch (\Exception $e) { Log::error("Exception occurred while sending WhatsApp message" . $e->getMessage()); // Handle exception } } } try this, change the environment to fit yours, this code can send messages to multiple numbers, 20 numbers at once using the API Look carefully... whose code is longer? We both use functions, but focus on my code. I placed the API outside the function so it can send 1 million numbers. It can link more than one API, so it is not limited to just 10 numbers. Don't forget that I only used CURL and variables, whereas in your code you used env, curl, classes, catch, try, foreach, json_encode, log, is_array, etc. Overall, focus on my code.. it is smaller, easier, and more practical. Try sending 10 messages to 10 people using your code and check the CPU usage while sending just 10 messages. You are consuming a lot of server resources. my friend.. CURL is just a browser.. it doesn't consume anything even if you send 1 million messages. Strength is not in muscles.. strength is in the way you use your mind. Quote Link to comment Share on other sites More sharing options...
MURASAKI. Posted May 22 Share Posted May 22 Hello, can everybody help? After the apps succesfully installed and connecting via QR code. 1. Feature "Auto Reply" is not auto connecting with my WhatsApp. I must be logging and click "Connect Via Code" for running normal again. 2. When I test feature "Test Message" is not working very well and show Error "500 SERVER ERROR" couse i set .env to production. Big HELP. Thanks. Quote Link to comment Share on other sites More sharing options...
The Billionaire Posted May 22 Share Posted May 22 2 hours ago, Magd Almuntaser said: Look carefully... whose code is longer? We both use functions, but focus on my code. I placed the API outside the function so it can send 1 million numbers. It can link more than one API, so it is not limited to just 10 numbers. Don't forget that I only used CURL and variables, whereas in your code you used env, curl, classes, catch, try, foreach, json_encode, log, is_array, etc. Overall, focus on my code.. it is smaller, easier, and more practical. Try sending 10 messages to 10 people using your code and check the CPU usage while sending just 10 messages. You are consuming a lot of server resources. my friend.. CURL is just a browser.. it doesn't consume anything even if you send 1 million messages. Strength is not in muscles.. strength is in the way you use your mind. I am sorry if I have said something that got you upset, I didn't mean to, please don't see it that way either, forgive me Quote Link to comment Share on other sites More sharing options...
sadat jigar Posted May 23 Share Posted May 23 @MURASAKI. WhatsApp QR and Via Code Note Working Please Help Quote Link to comment Share on other sites More sharing options...
MarCoVar01 Posted May 23 Share Posted May 23 9 hours ago, sadat jigar said: @MURASAKI. WhatsApp QR and Via Code Note Working Please Help You have to verify that Nodejs is working and that you start the server.js file with the same Quote Link to comment Share on other sites More sharing options...
sadat jigar Posted May 24 Share Posted May 24 @MarCoVar01 Yes Brother Node JS Working Fine Issue : - QR Scan After Auto Logout Quote Link to comment Share on other sites More sharing options...
ashoksingh shekhawat Posted May 25 Share Posted May 25 https://prnt.sc/SgfyEjmkXWrx https://prnt.sc/y7bbsJyb6xKo please click on above url to see errors and please help solve my issue Quote Link to comment Share on other sites More sharing options...
ashoksingh shekhawat Posted May 25 Share Posted May 25 also getting this error Quote Link to comment Share on other sites More sharing options...
ashoksingh shekhawat Posted May 25 Share Posted May 25 @Magd Almuntaser please check my above error and please help to solve Quote Link to comment Share on other sites More sharing options...
Hugo Fernando Ochoa Posted May 25 Share Posted May 25 On 5/21/2024 at 6:42 PM, MarCoVar01 said: @Hugo Fernando Ochoa quieres enviar un mensaje de correo con php, o hablar de usar la plataforma Whatsapp Gateway? Enviar un mensaje desde php a un whatsapp pero no usando la plataforma sino desde una pagina externa, pero ya lo solucioné, ya vi como hacerlo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.