|
|
@@ -1,6 +1,6 @@
|
|
|
<?php
|
|
|
class SendToDevice {
|
|
|
- function SendToDevice($title, $message, $regId)
|
|
|
+ public function std($title, $message, $regId)
|
|
|
{
|
|
|
require_once('PushNotifications.php');
|
|
|
// Message payload, using data from post request
|
|
|
@@ -11,10 +11,5 @@ class SendToDevice {
|
|
|
$var = new PushNotifications();
|
|
|
$var->android($msg_payload, $regId);
|
|
|
}
|
|
|
-
|
|
|
- if ( $_SERVER['REQUEST_METHOD'] == 'POST' && (!empty($_POST['SendTo']))) {
|
|
|
- SendToDevice($_POST['title'], $_POST['messageBody'], $_POST['SendTo']);
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
?>
|