mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-06 23:17:28 +08:00
Push Examples (#3735)
This commit is contained in:
14
extra/push-examples/php/index.php
Normal file
14
extra/push-examples/php/index.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
const PUSH_URL = "https://example.com/api/push/key?status=up&msg=OK&ping=";
|
||||
const interval = 60;
|
||||
|
||||
while (true) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, PUSH_URL);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
echo "Pushed!\n";
|
||||
sleep(interval);
|
||||
}
|
||||
|
Reference in New Issue
Block a user