title: Apple push notification with cURL
body: <p>Is there a way to implement in PHP a posting push notification system by using cURL (instead of stream_socket_client) ?</p>
  
  <p>I wrote :</p>
  
  <pre><code>$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);
  </code></pre>
  
  <p>But how to set the device token and the json message ?</p>