If possible.
You must set up your application in Google Firebase: link
To send the notification from PHP you must use CURL, something similar to the following code:
public function SendGlobalNotification($Message)
{
$url = 'https://fcm.googleapis.com/fcm/send';
$headers = array(
'Authorization: key=' . 'AAAAZjH-iIw:APA91bGc1NPUOJfHlsgu_f8SxTvisH86-4QEZxun5l6Mn6vbv9XwTjesELMAXR2vlGnCuX6znafH8SsX5bagh9-Rf4SUgmTpNPZZ73meSfFfG5zTzqZuy9GSS2t1zCREUKtv0HX-gEEp',
'Content-Type: application/json'
);
$msg = array('body' => $Message);
$fields = array
(
'to' => '/topics/user',
'notification' => $msg
);
// Open connection
$ch = curl_init();
// Set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Disabling SSL Certificate support temporarily
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
// Execute post
$result = curl_exec($ch);
// Close connection
curl_close($ch);
}
And to receive notification in Mobile Applications you must use the Google Firebase library: link