amrikasir/firebasecmclient
Composer 安装命令:
composer require amrikasir/firebasecmclient
包简介
PHP Library Client Firebase Cloud Messaging
README 文档
README
Install dulu dari composer:
>$ composer require amrikasir/firebasecmclient
baru deh di PHPnya.
<?php require_once __DIR__ . '/vendor/autoload.php'; use ald\FirebaseCM; use ald\Push;
SET Push Parameter
$push = new Push( "ALD Push Notification", //Title "dari: " . $_SERVER['HTTP_HOST'] //Message );
SET Server Key
$notification = new FirebaseCM( //this is key from server Firebase Cloud Messaging Console //and this is new Server key "SERVER_KEY_FROM_FCM_CONSOLE" //old legacy server key //"OR_LEGACY_SERVER_KEY" );
Finaly...
SET Server Key
echo $notification->send( //This is token from client (Android / iOS) //You can store this token in mysql server or other dbms array( 'REGISTRATION_TOKEN', 'OTHER_REGISTRATION_TOKEN' ), $push->getPush() );
Dibuat untuk keperluan internal tim.
jika butuh, dan (kalau bisa) kembangkan menjadi lebih baik.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2017-07-20