php PUSH-服务器无法发送多个推送消息
我有一个 php 脚本,它从 mysql 数据库中获取几个 uuid,然后向所有用户发送一条消息。 但是当用户很多的时候就不行了。
该脚本可以在这里找到: http://pastebin.com/VATM1eaC
在第 19 行,我有一个注释 $ sql查询。当我使用那个时,它起作用了。那里的两个 UUID 是我和我的朋友。但是当它从数据库中获取所有 UUID 时,它不起作用(知道数据库中有几个人没有得到 PUSH。)。 该数据库包含大约 300 个 UUID。
我测试了每次 fwrite 之后添加 sleep(1) ,看看这是否有帮助,但没有。 (当我只将消息推送给我和我的朋友时,它对另一个脚本有所帮助,但多次)。
有什么建议吗?
I have a php-script that fetches a couple of uuid's from a mysql database and then sends a message to all the users.
But it doesn't work when there are a lot of users.
The script can be found here: http://pastebin.com/VATM1eaC
On line 19, I have a commented $sql query. When I use that one it works. The two UUID's there are my and my friends. But when it fetches all UUID's from the database, it doesn't work (a know a couple of people in the database that doesn't get the PUSH.).
The database contains around 300 UUID's.
I tested added sleep(1) after each fwrite, to see if that helped, but it didn't. (It helped on another script, when I only pushed the message to me and my friend, but several times).
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们使用这个库http://code.google.com/p/apns-php/ 用于向我们的用户发送推送通知。目前,我们拥有大约 40,000 多名用户,每天发送超过 200,000 条推送通知,没有任何问题。
我会检查那个图书馆。它很容易实现并且运行完美!
We use this library http://code.google.com/p/apns-php/ for sending push notifications to our users. We currently have around 40.000+ users and we send out over 200.000 push notifications a day without any problems.
I would check that library. It's easy to implement and works perfectly!