2

I am running the below which is working perfectly in my localhost but when i ran the same code from my site(https://**.co) the notification is not working.I dont receive any message

Below is my sample code

<?php
$url = "https://updates.push.services.mozilla.com/wpush/v1/gAAAAABX8iWjb-FGul8QzsWYkzgjMp8uRhKXaEtf3nr9CCy7lY1gLpkNHGwLUFKPa0iZ_bXND0meKat_BBEiN46EAhjygD9h_q0onLwFZr-AKSJBeSGmzgpk8OUvtDpPCrLZ2ZS_uSyl";

$ch = curl_init();  

curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('ttl: 60'));
curl_setopt($ch, CURLOPT_POST, true);

$output=curl_exec($ch);
curl_close($ch);
print_r($output);

I have a seperate code for chrome which is working perfectly fine for chrome browser. I took the chrome code from this link How use php curl to send push message in Firefox

but for firefox i am unable to send from my website. Any insight on how to fix this will be greatly appreciated.Thanks

user2065795
  • 741
  • 1
  • 6
  • 8

0 Answers0