SimpleCloudNotifier/web/api.php

57 lines
2.6 KiB
PHP
Raw Permalink Normal View History

2018-09-22 18:00:00 +02:00
<!DOCTYPE html>
<html lang="en">
2018-11-18 03:34:05 +01:00
<?php
if (file_exists('/var/www/openwebanalytics/owa_php.php'))
{
require_once('/var/www/openwebanalytics/owa_php.php');
$owa = new owa_php();
$owa->setSiteId('6386b0efc00d2e84ef642525345e1207');
$owa->setPageTitle('API (Short)');
$owa->trackPageView();
}
?>
2018-09-22 18:00:00 +02:00
<head>
<meta charset="utf-8">
2018-11-12 12:41:59 +01:00
<link rel="stylesheet" href="/css/mini-default.min.css"> <!-- https://minicss.org/docs -->
2018-09-27 02:38:46 +02:00
<title>Simple Cloud Notifications - API</title>
2018-09-22 19:40:50 +02:00
<!--<link rel="stylesheet" href="/css/mini-nord.min.css">-->
<!--<link rel="stylesheet" href="/css/mini-dark.min.css">-->
2018-09-22 18:00:00 +02:00
<link rel="stylesheet" href="/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
2018-11-12 15:28:07 +01:00
<link rel="icon" type="image/png" href="/favicon.png"/>
<link rel="icon" type="image/png" href="/favicon.ico"/>
2018-09-22 18:00:00 +02:00
</head>
<body>
2018-11-13 16:05:25 +01:00
<div id="copyinfo">
<a tabindex="-1" href="https://www.blackforestbytes.com">&#169; blackforestbytes</a>
<a tabindex="-1" href="https://www.mikescher.com">made by Mike Schw&ouml;rer</a>
</div>
2018-11-12 12:41:59 +01:00
<div id="mainpnl">
2018-11-13 16:05:25 +01:00
<a tabindex="-1" href="https://play.google.com/store/apps/details?id=com.blackforestbytes.simplecloudnotifier" class="button bordered" id="tl_link"><span class="icn-google-play"></span></a>
<a tabindex="-1" href="/index.php" class="button bordered" id="tr_link">Send</a>
2018-09-22 18:00:00 +02:00
2018-11-13 16:05:25 +01:00
<a tabindex="-1" href="/" class="linkcaption"><h1>Simple Cloud Notifier</h1></a>
2018-09-22 18:00:00 +02:00
<p>Get your user-id and user-key from the app and send notifications to your phone by performing a POST request against <code>https://simplecloudnotifier.blackforestbytes.com/send.php</code></p>
2018-09-27 02:38:46 +02:00
<pre>curl \
--data "user_id={userid}" \
--data "user_key={userkey}" \
--data "title={message_title}" \
2018-11-12 12:41:59 +01:00
--data "content={message_body}" \
--data "priority={0|1|2}" \
--data "msg_id={unique_message_id}" \
2018-09-27 02:38:46 +02:00
https://scn.blackforestbytes.com/send.php</pre>
2018-11-12 12:41:59 +01:00
<p>The <code>content</code>, <code>priority</code> and <code>msg_id</code> parameters are optional, you can also send message with only a title and the default priority</p>
2018-09-27 02:38:46 +02:00
<pre>curl \
--data "user_id={userid}" \
--data "user_key={userkey}" \
--data "title={message_title}" \
https://scn.blackforestbytes.com/send.php</pre>
2018-11-12 12:41:59 +01:00
2018-11-17 01:30:41 +01:00
<a href="/api_more.php" class="button bordered tertiary" style="float: right; min-width: 100px; text-align: center">More</a>
2018-11-12 12:41:59 +01:00
</div>
2018-09-22 18:00:00 +02:00
</body>
</html>