Skip to content

Instantly share code, notes, and snippets.

View iDavidMorales's full-sized avatar
💭
HappyCode<3

David Morales iDavidMorales

💭
HappyCode<3
View GitHub Profile
@IsmailShurrab
IsmailShurrab / firebase notification curl
Created December 10, 2017 12:35
firebase notification curl php
<?php
$url = "https://fcm.googleapis.com/fcm/send";
$token = "your device token";
$serverKey = 'your server token of FCM project';
$title = "Notification title";
$body = "Hello I am from Your php server";
$notification = array('title' =>$title , 'text' => $body, 'sound' => 'default', 'badge' => '1');
$arrayToSend = array('to' => $token, 'notification' => $notification,'priority'=>'high');
$json = json_encode($arrayToSend);
$headers = array();
/**
* Bot para whatsapp
* web: https://kuatroestrellas.github.io/blog/
* responde al hola mundo con un mensaje
* requiere nodejs v12 o superior y las librerias qrcode-terminal y whatsapp-web.js
* npm i qrcode-terminal whatsapp-web.js
**/
const qrcode = require('qrcode-terminal');