且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

推送通知服务器实现

更新时间:2023-02-16 22:20:44

我找到了一个解决方案,我不知道它是否是***的,但它有效.在 Abstract.php(该文件是 apns-php 源代码的一部分)上,我注释了第 343 行.现在它看起来像这样:

I have found a solution, I don't know if it's the best, but it works. On Abstract.php (this file is part of the apns-php source) I have commented the line 343. Now it looks like this:

$streamContext = stream_context_create(array('ssl' => array(
//'verify_peer' => isset($this->_sRootCertificationAuthorityFile),
'cafile' => $this->_sRootCertificationAuthorityFile,
'local_cert' => $this->_sProviderCertificateFile
)));

我真的不知道这条线有什么意义,但知道推送通知工作正常.我怀疑它是否也能在生产服务器上正常工作.有人知道吗?

I really don't know what is the point of this line, but know the push notification is working properly. My doubt is if it will work properly too on production server. Someone knows?