HSP 側チャット機能

This commit is contained in:
2023-06-30 08:36:07 +09:00
parent dc11b07c4e
commit 2bd0e8a5aa
3 changed files with 33 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
#module \
Chat
#define URL ("http://miteruzo.ml/goatoh_training/chat.php")
#defcfunc \
New \
int p_id
id.insNum = p_id
insNum++
Return insNum - 1
#deffunc \
Send \
str p_message
int p_insId
HTTPLoad URL, StrF ("id=%d&text=%s", id.p_insId, p_message)
Return
#global
+8
View File
@@ -2,3 +2,11 @@
require_once './modules/common.mod.php';
$db = new Chat;
$user_id = $_POST['id'];
$chat_message = $_POST['text'];
$db -> send_chat ($user_id, $chat_message);
+1 -1
View File
@@ -20,7 +20,7 @@ Chat
}
function
sendChat (
send_chat (
int $user_id,
string $text):
void