【发布时间】:2020-05-30 15:41:40
【问题描述】:
是否可以从 php 服务器端向 Visual Basic 发送通知,或者我必须每 x 分钟将服务器端数据库与本地数据库同步一次以检查是否有任何更改?
<?php
require("connection.php");
include 'send_notification.php';
if (!$conn) {
$response["response"] = false;
$response["log"] = mysqli_error($conn);
$response["exception"] = 1;
echo json_encode($response);
} else {
$pricing = json_decode($_POST['pricing'], true);
$user = json_decode($_POST['user'], true);
// Here update database....
$company_token = getCompanyToken($user["id"]); // Find company token from MySql database to send FCM to Android Client
sendNotification($company_token); // Send Notification To Android...It works fine..
// Same notification to Visual Basic Windows Client...
// Help!! Synchronize local database with the server or is there any other way?
}
mysqli_close($conn);
}
?>
【问题讨论】:
标签: php android vb.net firebase-cloud-messaging