Push notification REST service (using cURL and PHP) suddenly started timing out?
Recently, the Push notification REST service we have implemented on our website (using cURL) has started timing out. Upon looking at the documentation, I realized the entire REST service parameter formats have changed!
Here is my current script, just for a quick reference:
precode$data = array(
'channels' => array($push_channel_id),
'message' => $message,
'deviceID' => $device->device_id
);
$data_string = json_encode($data);
$ch = curl_init('https://api.appery.io/rest/push/msg');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-Appery-Push-Master-Key:' . $push_master_key,
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
));
curl_exec($ch);/code/pre