php PUSH-服务器无法发送多个推送消息

发布于 2024-12-06 09:16:20 字数 417 浏览 5 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小沫ゞ 2024-12-13 09:16:20

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文