title: Facing problems in ios push notification php code
body: <p>I use this code in php...</p>
  
  <pre><code>function pushnotificationios( $deviceToken, $message, $badges){
          $passphrase = "12345";
          $ctx = stream_context_create();
          stream_context_set_option($ctx, 'ssl', 'local_cert', $_SERVER['DOCUMENT_ROOT'].'/include/ck.pem');
          stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
          $fp = stream_socket_client(
              "ssl://gateway.push.apple.com:2195", $err,
          $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx); 
          $body['aps'] = array(
              //'badge' =&gt; $badges,
              'badge' =&gt; "+1",
              'alert' =&gt; $message['message'],
              'sound' =&gt; 'default',
              'content-available' =&gt; '1'
          );
          $body['msg'] =$message;
          $payload = json_encode($body);
          $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;
          $result = fwrite($fp, $msg, strlen($msg));
   //echo "&lt;pre&gt;"; print_r($result);
          fclose($fp);
          return $result;
      }
  </code></pre>
  
  <p>.pem file and their password is correct. but when i hit this function then only on production mode it give me return false;</p>
  
  <pre><code>$result = pushnotificationios( $deviceToken, $message, $badges);
   echo "&lt;pre&gt;"; print_r($result);
  </code></pre>
  
  <p>And it takes too much time to response. </p>
  
  <p>Currently i am not find any solution.. my api is going to apple and my notifications is not working. The interesting thing is its a chating app and whole app is based on notifications. Its a bad day for me.</p>
  
  <p>Please help if something happen good for me for app.</p>