Esiste un modo per implementare in PHP un sistema di notifica push di pubblicazione utilizzando cURL (anziché stream_socket_client)?Notifica push Apple con cURL
ho scritto:
$url = 'https://gateway.sandbox.push.apple.com:2195';
$cert = 'AppCert.pem';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSLCERT, $cert);
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, "passphrase");
$curl_scraped_page = curl_exec($ch);
Ma come impostare il dispositivo token e il messaggio JSON?
Perché non guardare le librerie a prontamente disponibili> http://www.easyapns.com/ – BenM
@BenM perché non voglio usare la funzione stream_socket_client perché non consente l'opzione proxy con il protocollo ssl – Pierre