https://api.getping.info/QvpXmD/hello
* This is just an example, please sign in to see your own unique endpoint
QvpXmD | Your Unique Key |
hello | Example message |
content-length: 43 content-type: image/gif status: 200
Our API will respond to any request with a simple, transparent 1x1 gif image.
curl https://api.getping.info/QvpXmD/hello
You can run this command in your terminal.
[Unit] Description=my_app [Service] ExecStart=/usr/bin/my_app ExecStartPost=/usr/bin/curl https://api.getping.info/QvpXmD/app_restarted Restart=always RestartSec=5
For most Linux distributions, Systemd will be the officially support init process. This is a sample .service file to show how you can get notified when your service gets restarted.
# m h dom mon dow command 0 9 * * * /path/to/task.sh && curl https://api.getping.info/QvpXmD/task_executed
Cron is normally used to schedule a job that is executed periodically. You can append an API call as shown in the example to get notified.
<img src="https://api.getping.info/QvpXmD/seen">
Since the API returns a transparent 1x1 gif image, you can use it on your web page (or email) to count the hits like shown above.
import requests r = requests.get("https://api.getping.info/QvpXmD/ping")
Python make this very simple.
file_get_contents("https://api.getping.info/QvpXmD/notify");
Making a GET request in PHP is easy enough, one line of code...
fetch("https://api.getping.info/QvpXmD/notify");
One line of code in javascript to get your notification.
$.ajax({url:"https://api.getping.info/QvpXmD/notify"});
This can also be done with jquery/ajax