-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
41 lines (30 loc) · 888 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
require_once 'autoload.php';
$setArray = [
'profileName' => 'profile-name',
'AuthKey' => 'auth-key'
];
$devices = ['device-tokens'];
$notifyConfig = [
'title' => "Your push title",
"message" => "your push message!",
"android" => [
'title' => "Your push title",
"message" => "your push message!",
"sound" => "your-sound-src" // default
],
"ios" => [
'title' => "Your push title",
"message" => "Your push title",
"sound" => "your-sound-src" // default
]
];
$IonicPush = new IonicPush($setArray);
$IonicPush -> getDevices($devices);
$IonicPush -> setNotificationArray($notifyConfig);
if ($IonicPush -> send()){
echo 'Push Sent';
}else {
print_r ( $IonicPush -> err );
}
?>