Hugo Fernando Ochoa Posted May 25 Share Posted May 25 Si necesitan enviar un mensaje a Whatsapp desde php y sin hacerlo desde la plataforma, pueden usar esto desde cualquier web externa, solo cambien los valores necesarios <?php // URL de destino $url = 'https://www.example.com/endpoint'; // URL a la que deseas enviar la solicitud // Datos a enviar (si es necesario) $postData = http_build_query(array( 'key1' => 'value1', 'key2' => 'value2' )); // Opciones de contexto para la solicitud (ignorar resultados y errores) $contextOptions = array('http' => array( 'method' => 'POST', 'header' => "Content-Type: application/x-www-form-urlencoded\r\n" . "Content-Length: " . strlen($postData) . "\r\n", 'content' => $postData, 'ignore_errors' => true // Ignorar errores en la respuesta )); $context = stream_context_create($contextOptions); // Realizar la solicitud sin mostrar resultados ni datos $response = file_get_contents($url, false, $context); if ($response === false) { echo "La solicitud no se pudo completar."; } else { echo "Solicitud enviada correctamente sin mostrar resultados ni datos."; } ?> Quote Link to comment Share on other sites More sharing options...
pisang masbro Posted May 28 Share Posted May 28 hELP : vendor/symfony/string/Resources/functions.php on line 34 1 Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted May 28 Share Posted May 28 On 5/25/2024 at 2:40 PM, ashoksingh shekhawat said: also getting this error The problem from nodjs You need to install nodjs 16.2 Only this version is stable .. so after install this version you install (pm2): npm install pm2@latest -g # or yarn global add pm2 # after install pm2 you run this command and change the info to your website: cd /home/username/public_html/whatsappscript pm2 start server.js Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted May 28 Share Posted May 28 1 hour ago, pisang masbro said: hELP : vendor/symfony/string/Resources/functions.php on line 34 I don't exactly know what your problem is. Can you clarify more? Is it when sending a message, opening the website, or something else? It seems your current issue is that you updated the package.json via npm, which you should never do because the script is compatible with the specific vendors listed within it. 1 Quote Link to comment Share on other sites More sharing options...
Sup Posted May 28 Share Posted May 28 2 hours ago, pisang masbro said: hELP : vendor/symfony/string/Resources/functions.php on line 34 indo juga wkwkwk Quote Link to comment Share on other sites More sharing options...
pak kacung Posted May 30 Share Posted May 30 On 5/29/2024 at 4:03 AM, Magd Almuntaser said: The problem from nodjs You need to install nodjs 16.2 Only this version is stable .. so after install this version you install (pm2): npm install pm2@latest -g # or yarn global add pm2 # after install pm2 you run this command and change the info to your website: cd /home/username/public_html/whatsappscript pm2 start server.js Ini dimenu apa? Dimenu apa ya ini? Quote Link to comment Share on other sites More sharing options...
kecoamumet Posted May 30 Share Posted May 30 v7.0 not nulled yet? Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted May 30 Share Posted May 30 36 minutes ago, kecoamumet said: v7.0 not nulled yet? Do you have v7.0? Upload it. We will try nulled it. Quote Link to comment Share on other sites More sharing options...
pisang masbro Posted May 30 Share Posted May 30 On 5/29/2024 at 5:30 AM, Sup said: indo juga wkwkwk Masbuloh Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted May 30 Share Posted May 30 6 hours ago, pak kacung said: Dimenu apa ya ini? If you have VPS you run this commands from SSH .. If you have cpanel you can run from Terminal or you can ask your hosting to run thia commands Quote Link to comment Share on other sites More sharing options...
bloserda Posted May 31 Share Posted May 31 Apakah ada yang mengerti bagaimana cara mendapatkan group id whatsapp? seperti blablala@g.us Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted May 31 Share Posted May 31 1 hour ago, Bloserda BlogSerbaAda said: Apakah ada yang mengerti bagaimana cara mendapatkan group id whatsapp? seperti blablala@g.us https://kirimwa.classy.id/2023/02/cara-mendapatkan-id-grup-whatsapp-dan.html i hope it can help you Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted June 1 Share Posted June 1 On 5/31/2024 at 6:05 PM, Bloserda BlogSerbaAda said: Apakah ada yang mengerti bagaimana cara mendapatkan group id whatsapp? seperti blablala@g.us From phonebook menu Quote Link to comment Share on other sites More sharing options...
bloserda Posted June 1 Share Posted June 1 @Magd Almuntaser Omg how old me, i didnt saw that preety blue sky button there, before you told Thank you bro, autoreply, api (message, media) integration with google apps script work good! Quote Link to comment Share on other sites More sharing options...
mantapin Posted June 2 Share Posted June 2 Has anyone tried this WA Gateway integration into autoreplay integration with Gsheet? Quote Link to comment Share on other sites More sharing options...
pak kacung Posted June 2 Share Posted June 2 @mantapin webhooknya dari gsheet maksudnya? Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted June 2 Share Posted June 2 2 hours ago, pak kacung said: @mantapin webhooknya dari gsheet maksudnya? Do you have tutorial how to make webhook from gsheet mas bro? Quote Link to comment Share on other sites More sharing options...
The Billionaire Posted June 2 Share Posted June 2 15 minutes ago, Gusik Prasetyo said: Do you have tutorial how to make webhook from gsheet mas bro? @Gusik Prasetyo i can tell you how i did mine Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted June 2 Share Posted June 2 33 minutes ago, The Billionaire said: @Gusik Prasetyo i can tell you how i did mine Yes please, share yours here bro. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Gusik Prasetyo Posted June 2 Share Posted June 2 18 hours ago, Bloserda BlogSerbaAda said: @Magd Almuntaser Omg how old me, i didnt saw that preety blue sky button there, before you told Thank you bro, autoreply, api (message, media) integration with google apps script work good! Share please Quote Link to comment Share on other sites More sharing options...
bloserda Posted June 2 Share Posted June 2 @Gusik Prasetyo Example how to Blast / Bulk message (Different message per number) type blast: Text (yourhost.com/send-message) 1. Create New spreadsheet : Column : ColA | ColB | ColC Exp. Col Name : Destination | Message | Status *Note Destination: - use numberphone send to personal (628xxxxxxxx) - use JID send to group (blablabla@g.us) (how to get JID? click Fetch From Selected Device on menu mpwa Phonebook) 2. Create send button: a. Click Insert -> Drawer (textboxt, SEND) -> Save & Close b. On shape, right click 3 dot on left choose Assign script type: sendAll 3. Create Google Apps Script: a. Still on your spreadsheet, click menu Extension -> Apps Script b. Copy paste sript below: // Start Here var url = "http://yourhost/send-message"; var apiKey = "your api_key"; var sender = "your number sender"; function blastWa(number, message) { var data = { 'api_key': apiKey, 'sender': sender, 'number': number, 'message': message }; var options = { "method": "POST", "contentType": "application/json", "payload" : JSON.stringify(data), }; UrlFetchApp.fetch(url, options); } function sendFromSheets(){ var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 2; var numRows = sheet.getLastRow() - 1; var dataRange = sheet.getRange(startRow, 1, numRows, 2); var data = dataRange.getValues(); for (var i = 0; i < data.length; i++){ var row = data[i]; var status; try { var response_data = blastWa(row[0], row[1]); status = "Success"; } catch(err) { Logger.log(err); status = "Error"; } sheet.getRange(startRow + i, 3).setValue(status); Utilities.sleep(10000); //example time delay } } function sendAll(){ sendFromSheets(); } //End Here c. Save (give all permission needed). 4. Running on spreadsheet click on button SEND you have been create. How if wanna blast/bulk message different media per number? yourhost.com/send-media, change method post (API Docs) { "api_key": "1234567890", "sender": "62888xxxx", "number": "62888xxxx", "media_type": "image", "caption": "Hello World", "url": "https://example.com/image.jpg" } 1 Quote Link to comment Share on other sites More sharing options...
bloserda Posted June 3 Share Posted June 3 @mantapin jika pakai api, coba cek di youtube kalau tidak salah produk milik whacenter atau kl mau gampang autoreply integrasi dgn gsheet pakai apk whatsauto di playstore (gratis), tinggal masukkan link google sheet di setting apknya selesai (saya pernah pakai stabil), tapi jika handphone/sinyal mati, bot mati juga Quote Link to comment Share on other sites More sharing options...
pak kacung Posted June 3 Share Posted June 3 @Gusik Prasetyo buat menagkap pesan dulu function doPost(e) { // Membaca pesan let conten = e.postData.contents; let json = JSON.parse(conten); let wa = json['from']; let senderMessage = json['message']; let pesan = senderMessage.toLowerCase(); let image = json['bufferImage']; if (pesan == 'menu') { let msg = "Silahkan pilih menu"; kirimpesan(wa, msg); } } function kirimpesan(wa, msg) { var APIKey = "your api key" var url = "https://wa.trioputra.my.id/send-message"; var payload = { 'api_key': APIKey, 'sender': '6281559554xxx', "number": wa, 'message': msg, }; var response = UrlFetchApp.fetch(url, { "method": "post", "headers": { "apikey": APIKey }, "payload": payload }); Logger.log(response.getContentText()); } deploy lalu copy url web dan paste di webhook 2 Quote Link to comment Share on other sites More sharing options...
Gerry 施顺杰 Sidharta Posted June 4 Share Posted June 4 halo semua master disini tolong bantu dong.. saya coba install di vps ubuntu 22.04 dan semua sdh jalan node . juga sdh aman Server run and listening port: 3100 tapi kok masih waiting node server ya apakah ada yang saya masih kurang atau salah langkah ya ? Quote Link to comment Share on other sites More sharing options...
Magd Almuntaser Posted June 4 Share Posted June 4 28 minutes ago, Gerry 施顺杰 Sidharta said: halo semua master disini tolong bantu dong.. saya coba install di vps ubuntu 22.04 dan semua sdh jalan node . juga sdh aman Server run and listening port: 3100 tapi kok masih waiting node server ya apakah ada yang saya masih kurang atau salah langkah ya ? Anda harus menggunakan tautan situs http, bukan https ======== You should use http in link, not https 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.