如何通过php推送到iphone/android手机

发布于 2024-12-20 15:12:28 字数 186 浏览 0 评论 0原文

如何使用 php 脚本推送到 iphone 或 android 手机?

我现在的想法是拥有一个 php 脚本,该脚本将在 Web 服务器上每 15 分钟运行一次,检查情况 x 是否满足,如果不满足则将通知推送到手机。

如果有可能的话,如何才能实现这一点呢?如果不是,我应该采取什么方法来实现这一目标?任何链接或故障将不胜感激。

How can I use a php script to push to an iphone or android phone?

What I am thinking right now is to have a php script that will run every 15 minutes on a web server, check if case x is satisfied, if not push a notification to the phone.

How can this be accomplished if its even possible? If not what approach should I take to achieving this? Any links or break downs would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

冷情妓 2024-12-27 15:12:29

与其重新发明轮子,不如使用现有工具,例如Urban Airship?他们提供了 PHP 库 以及 使用 PHP 的 libcurl 的超级简单示例。

Instead of reinventing the wheel, how about using an existing tool such as Urban Airship? They provide a PHP library as well as a super-simple example using PHP's libcurl.

纸短情长 2024-12-27 15:12:29

如果您想自己发送通知,则需要阅读有关向每个平台发送推送通知的信息。 这个问题(和答案)解决了在 Android 上发送通知的问题。 这篇文章是除了 Apple 文档之外,还有许多解释 iOS 流程的文档之一。如果您使用 Urban Airship 等第三方服务,则需要查看该 API

If you want to send the notifications yourself, you'll need to read up on sending push notifications to each platform. This SO question (and answer) address sending notifications on Android. This article is one of many in addition to Apple's docs that explain the process for iOS. If you use a third party service like Urban Airship, you'll need to look at that API instead.

忆悲凉 2024-12-27 15:12:29

如果您想设置自己的推送通知服务器,您应该查看 Easy APNS。它是一个用于推送通知的 PHP 库,非常容易设置和自定义。

If you want to setup your own server for push notifications, you should take a look at Easy APNS. It's a PHP library for push notifications which is very easy to set up and customize.

[旋木] 2024-12-27 15:12:29

Android 云到设备消息传递框架用于将通知推送到 Android 设备。您可以自己开发服务器部分或使用现有服务,例如 Urbanairship。它允许您向 Android 和 iPhone 发送推送,但您必须付费。

Android Cloud to Device Messaging Framework is used to push notifications to Android devices. You can develop server part yourself or use existing service such as Urbanairship. It allows you to send pushes to both Android and iPhone but you'll have to pay for it.

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