Today I'm going to introduce a great tool that I've been using for over two years, but haven't had time to recommend to others: Pushover, a mobile push notification service API, including its usage, settings, and implementation.
use
Push notifications are placed at key points (such as user registration, reports, comments, system checks, etc.). When a point is triggered, it will send a push notification to your phone, allowing you to get the key information immediately (such as a server failure).
Usage Introduction
It's very easy to use. Once you've set it up on the pushover website, simply add the API to any node you want to push to.
accomplish
Let's consider a use case where I want to know immediately if a user has registered in the system. Here are the implementation steps:
- Register a Pushover account: https://pushover.net/
- After logging in, you will see your API key and secret. Save them for later use.
- In the My Application section at the bottom, select Create New.
- Enter the application name (anything easy to identify), select "plugin" for the type (please refer to the documentation for changes), write anything you like for the description, enter the address you are using for the URL, and upload a nice-looking icon (it will be displayed on your phone).
- After filling in the information, an API Token/Key will be generated. Save it for later use.
The online steps are now complete. The remaining step is deploying the code, which I won't go into detail about here. It simply involves downloading a library and storing the key. Please refer to the documentation: https://pushover.net/api#messages
Here's a PHP example.
'https://api.pushover.net/1/messages.json', CURLOPT_POSTFIELDS => array( 'token' => 'Enter the key of your application here', 'user' => 'The userkey displayed after login', 'message' => 'This is the message', ), CURLOPT_SAFE_UPLOAD => true, )); curl_exec($ch); curl_close($ch); ?>
Isn't it easy? Just deploy the code to where you want, and you're done. The last step is to download the Pushover app from the App Store (I think it costs .99). However, once you buy it, you can transfer it anywhere with just one account. I bought it on both Google and Apple App Stores, and as long as you log in with the same account, you can download and receive push notifications.
You can also specify the accepted devices in the backend, but we won't go into details here.
Isn't it much easier than building your own push service? Let me end with a few pictures.
This siteOriginal articleAll follow "Attribution-NonCommercial-ShareAlike 4.0 License (CC BY-NC-SA 4.0)Please retain the following annotations when sharing or adapting:
Original author:Jake Tao,source:"Pushover API for Sending Push Notifications to Phones: Usage and Sample Code"

Comment list (7 items)
[...] Simple mobile push notifications: PushOver (See instructions for use:https://blog.jing.do/2172)[…]
Hello, I'm a complete beginner and have many questions I'd like to ask. Could we chat on WeChat? sange564813
Can you teach me?
@part:What's causing your problem? What's the specific issue?
Hi expert, I still don't understand many parts of your article. Do you take freelance work?
@anonymous:This is relatively easy to do. Try it out; feel free to ask me if you have any questions. I can outsource it.
@Jake Tao:How to contact