Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
filechange
/
WEBSITE
/
douche
:
firebase.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php $path_to_firebase_cm = 'https://fcm.googleapis.com/fcm/send'; $token = "AAAAUtrk-fg:APA91bGiVUkgyaqSAeTOKIjPixxPZJAL-GOVGPYmmuaU99plSxiNqwlEtn5j0gEtE1XAggOupB2RndmvBQZLNHxdjqqavVTjfPChInkxpIl7cqnxNNkFHL-yp1j0DtEGmWLvE4QWT7_HLFYvYFPrh3iT6W6_mNZhwg"; $fields = array( 'to' => $token, 'notification' => array('title' => 'Working Good', 'body' => 'That is all we want'), 'data' => array('message' => $message) ); $api_KEY = "AIzaSyAquEV6k0bgU4l5pkxqVtriB8GwCMD0IxE"; $headers = array( 'Authorization:key=' . $api_KEY, 'Content-Type:application/json' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path_to_firebase_cm); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields)); $result = curl_exec($ch); curl_close($ch); echo "done"; ?>