-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsendNotification.php
More file actions
36 lines (30 loc) · 909 Bytes
/
Copy pathsendNotification.php
File metadata and controls
36 lines (30 loc) · 909 Bytes
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
<?php
/**
* @file
* sendNotification.php
*
* Push demo
*
* LICENSE
* @author (C) 2014 thePHPinfo.com
* @version 1.0
*/
class Sendnotification extends BaseModel {
public function sendPushNot() {
//push notification for Apple devices
require_once 'iPhone_push.php';
$reg_id = 'registration_id of iphone';
$iPhonePush = new pushForIphone();
$data = Array(
'id' => 1
); // in data you can pass some extra value
$iPhonePush->sendIphoneNot("You have an new notifiaction.", $data, $reg_id);
//push notification for android devoice
require_once 'android_push.php';
$androidPush = new sendAndroidPush();
$reg_id = 'registration_id of android device';
$androidPush->sendpush("You have an new notifiaction.", $data, $reg_id);
return TRUE;
}
}
?>