I’m quite desperated trying to get my PHP server script running with HTTP v1 since Google stopped the functionality of Lecagy in June. No message has been send successfully anymore.
I’m using a webspace with php and I’m not the provider, so I can’t install third party packages or set environment variables, but that is always needed in all examples I’ve found so far.
My old code was running with code lines like this (not complete):
$curl = curl_init("https://fcm.googleapis.com/fcm/send");
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $FCM);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
but I do not find a suitable replacement for this for HTTP v1. I know that there’s a new URL for init
$curl = curl_init("https://fcm.googleapis.com/v1/projects/....../messages:send");
but that will not be enough to be substituted. Is there ANY suitable example for users who are not hosting their PHP environment by themselves ? Any help / hint would be highly appreciated …
24