Apologies if this is a basic but cant seem to find exact solution anywhere.
have a php code for APNS set up and working normally. have now been given the production pem file which is password protected.
kindly instruct where/how to pass that password parameter in the php. the push code is as follows:
$apnsHost = 'gateway.sandbox.push.apple.com';
$apnsPort = 2195;
$apnsCert = GetPemUrl();
$streamContext = stream_context_create();
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);
$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 10, STREAM_CLIENT_CONNECT, $streamContext);
$sent = False;
if ($apns) {
$apm = fwrite($apns, $apnsMessage);
if ($apm)
{
$sent = true;
}
else
{
$sent = FALSE;
}
//socket_close($apns);
fclose($apns);
}