File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/admin/notification/send_notiold.php
Back
<?php require "Connection.php"; $msg = $_POST['msg']; $title = $_POST['title']; $activity = $_POST['activity']; $path_to_fcm = "https://fcm.googleapis.com/fcm/send"; /*LIVE $server_key = "AAAA2X1gkUs:APA91bGZ9N3kvzfIOqe-CdGUybnkq9mwFJOsGQbTnR7hvULtvnNG9Ab1kddvsGNUxYpJLzMCZ_2wFAzsVXovj8jUwVQyEyBp6XngG2DIhR4VlxpOISDM4Qj1JCMnB_61HQ9xdYlQOcNy";*/ /*TEST API*/ $server_key = "AAAAl7iUq70:APA91bHxh5Yn4dGeSO3dI4__OvHuFetHZkNfkAulAXgUfrYNwWD2Lai2Xd_MwlaDd7GjXPDaN4bsE4NlMSDwH8IYsrJjTlT_bpXtyBCnuoSD6CtvpByYmaPAl7EXaSXG-wHaobnidrqH"; $curl_session = curl_init(); $headers = array( 'Authorization: key=' . $server_key, 'Content-Type: application/json' ); if($activity == "NONE") { $fields = array( 'to' => '/topics/IPO', 'notification'=> array( 'title'=> $title, 'body'=> $msg )); } else { $fields = array( 'to' => '/topics/IPO', 'notification'=> array( 'title'=> $title, 'body'=> $msg, 'click_action' => $activity )); } $payload = json_encode($fields); curl_setopt($curl_session, CURLOPT_URL,$path_to_fcm); curl_setopt($curl_session, CURLOPT_POST, true); curl_setopt($curl_session, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_session, CURLOPT_POSTFIELDS, $payload); $res = curl_exec($curl_session); echo $res; curl_close($curl_session); echo 'Notification Send Successfully'; ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings