function sendNotification($title = "", $body = "", $topic=""){
$authorization_key = "AAAAfwXXXX:XXXXXXXXXXXXXXX";
$fb_key_array = ['usertoken1', 'usertoken2'];
$arrayToSend = ['registration_ids' => $fb_key_array,
'notification' => ['title' =>$title , 'body' => $body, 'sound' => 'default'],
'priority' => 'high',
'data' => ['title' =>$title, 'body' => $body, 'topic'=>$topic] ];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://fcm.googleapis.com/fcm/send");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($arrayToSend)); //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: key='.$authorization_key));
$server_output = curl_exec ($ch);
curl_close ($ch);
}