tuhin18003 / php-push-notification-ios-android
Custom push notification server for IOS, Android & Windows phone APP with PHP. Instead of firebase you can use your own php server to create push notification.
dev-master
2019-12-14 17:02 UTC
Requires
- php: ^7.3
This package is auto-updated.
Last update: 2025-04-15 04:33:00 UTC
README
Custom push notification server for IOS, Android & Windows phone APP with PHP
What does it do?
- You can build your custom push notification service from your own php server.
Installation
Bleeding Edge
{ "require": { "tuhin18003/php-push-notification-ios-android": "dev-master" } }
Via command line:
composer require tuhin18003/php-push-notification-ios-android
IOS Push Notification Example:
require './vendor/autoload.php';
$Push_Notification = new Push_Notification\Push_Notification( 'development' );
$Ios_Notification = $Push_Notification->Ios();
$res = $Ios_Notification->setConfig( array(
'appBundleId' => 'com.test.com',
'deviceToken' => 'your device token',
'passPhrase' => 'your pass',
'pemFileAbsolutePath' => '/pusher.pem'
) );
$Ios_Notification->setPayload(
array(
'aps' => array(
'alert' => array(
'title' => 'test title',
'body' => 'test body',
),
'badge' => (int)10,
'sound' => 'default',
'mutable-content'=> 1,
'content-available'=>1
)
)
);
try {
$push_server_response = $Ios_Notification->send();
throw new Exception( $push_server_response, 1);
} catch (\Throwable $th) {
//throw $th;
echo $th->getMessage();
}
Credentials
- Created by - M.Tuhin
- For any kind of web & apps development contact us & visit our website - CodeSolz.net