VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/fcm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/fcm/index.html
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Notification</title>
    <style>
    </style>
</head>
<body>
    <h2 id="class-fcmnotificationcli">class FCMNotificationCLI</h2>
<p>Gởi thông báo đến 1 topic</p>
<pre><code class="lang-php"><span class="hljs-regexp">//</span>path <span class="hljs-keyword">in</span> server:  Root<span class="hljs-regexp">/fcm/</span>fcm_notification_cli.php
include_once <span class="hljs-string">"fcm_notification_cli.php"</span>;
<span class="hljs-variable">$res</span> =  FCMNotificationCLI::sendNotificationToTopic(<span class="hljs-string">"keeview_test"</span>, <span class="hljs-string">"Keeview Test Notification"</span>, <span class="hljs-string">"This is a test notification from Keeview."</span>, <span class="hljs-string">"https://lab.daithangminh.vn/general_images/Logo_Keeview_H_50.png"</span>, <span class="hljs-number">1</span>);
var_dump(<span class="hljs-variable">$res</span>);
</code></pre>
<table>
<thead>
<tr>
<th>Tên param</th>
<th>Kiểu</th>
<th>Ghi chú</th>
</tr>
</thead>
<tbody>
<tr>
<td>topic</td>
<td>string</td>
<td>Tên topic</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>Phần tiêu đề</td>
</tr>
<tr>
<td>body</td>
<td>string</td>
<td>nội dung</td>
</tr>
<tr>
<td>image</td>
<td>string hoặc null</td>
<td>Hình ảnh, đối với iOS, không hỗ trợ, có thể truyền null</td>
</tr>
<tr>
<td>badge</td>
<td>number</td>
<td>-1: không update, 0: xóa, &gt; 0:hiển thị số trên icon app</td>
</tr>
</tbody>
</table>
<p>Gởi thông báo đến 1 thiết bị, chỉ dùng để test</p>
<pre><code class="lang-php"><span class="hljs-keyword">include_once</span> <span class="hljs-string">"fcm_notification_cli.php"</span>;
$res =  FCMNotificationCLI::sendNotificationToTopic(<span class="hljs-string">"keeview_test"</span>, <span class="hljs-string">"Keeview Test Notification"</span>, <span class="hljs-string">"This is a test notification from Keeview."</span>, <span class="hljs-string">"https://lab.daithangminh.vn/general_images/Logo_Keeview_H_50.png"</span>, <span class="hljs-number">1</span>);
var_dump($res);
</code></pre>
<table>
<thead>
<tr>
<th>Tên param</th>
<th>Kiểu</th>
<th>Ghi chú</th>
</tr>
</thead>
<tbody>
<tr>
<td>userFCMToken</td>
<td>string</td>
<td>fcm token trên máy user</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>Phần tiêu đề</td>
</tr>
<tr>
<td>body</td>
<td>string</td>
<td>nội dung</td>
</tr>
<tr>
<td>image</td>
<td>string hoặc null</td>
<td>Hình ảnh, đối với iOS, không hỗ trợ, có thể truyền null</td>
</tr>
<tr>
<td>badge</td>
<td>number</td>
<td>-1: không update, 0: xóa, &gt; 0:hiển thị số trên icon app</td>
</tr>
</tbody>
</table>
<blockquote>
<p>Cách lấy userFCMToken để test: mở app, nhấn 23 lần nhanh và liên tục vào avatar người dùng, cửa sổ thông tin debug hiện lên, cuộn xuống dòng cuối có FCM token</p>
</blockquote>

</body>
</html>

VaKeR 2022