update chat
Deploy / Deploy (push) Successful in 40s

This commit is contained in:
www-data committed 2025-03-27 09:59:15 -03:00
1 parent e28a164a5c
commit 756d2a98b2
3 files changed
+136 -126

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<?php
if (isset($_POST['mensagem']) && isset($_GET['user'])) {
$mensagem = trim($_POST['mensagem']);
$user = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['user']); // sanitiza o nome do usuário
if ($mensagem !== '') {
$tmp_file = sys_get_temp_dir() . "/relay_chat_{$user}.txt";
file_put_contents($tmp_file, $mensagem);
}
}
?>