function send_notification($title , $msg , $token){
$body = $msg;
$fcmUrl = 'https://fcm.googleapis.com/fcm/send';
$data = [
'title' => $title,
'body' => $body,
];
$iosalert = [
'title' => $title,
'body' => $body,
'sound' => "default"
];
$m = [
'to' => $token,
'notification' => $iosalert,
'priority' => 10,
'data' => $data
];
$headers = [
'Authorization: key=' . "HERE_MY _SERVER_KEY",
'Content-Type: application/json;charset=UTF-8'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $fcmUrl);
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_POSTFIELDS, json_encode($m));
$result = curl_exec($ch);
curl_close($ch);
}