1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php include('_init.php'); include('webadmin/_functions.php');
$notification_title = $_GET["title"]; $notification_body = $_GET["message"]; $url = $_GET["url"];
/*$postData = array( "to" => ($_GET["token"]), "data" => array("title" => $notification_title, "message" => $notification_body, "url" => $url), "priority" => 'high', );*/
$postData = array( "to" => ($_GET["token"]), "notification" => array("title" => $notification_title, "body" => $notification_body, "body_loc_key" => $url), "priority" => 'high', );
$url = $site_info["app_notification_url"]; $response = call_curl($url, json_encode($postData), 1, array('Content-Type:application/json', 'Authorization: key=AAAAyRsLKLQ:APA91bErgy2gYFR3x1ruR--BDYQxYxtnmuLaNo7T-38li6vIh71looFbXRcVVsCPs2JNxmnQDxihHru31d6O4mnGTDVFSychoH3Kyj5RXSwCSXqbEUnqPbsUk2vn83-ST3zZf0YyjLCL'));
//only admin notification? $response_array = json_decode($response, true); var_dump($response_array);
|