tranc@DESKTOP-SBDJJJT MINGW64 ~
$ curl -i -X OPTIONS http://192.168.1.33:21680/completed/704_59_0/2025/03/1742835485.ts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK
Date: Tue, 25 Mar 2025 11:41:19 GMT
Server: Apache/2.4.62 (CentOS Stream)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('beforeunload', function (e) { | |
console.log('Tab is about to be closed'); | |
// Optionally show a confirmation dialog (not supported in all browsers) | |
e.preventDefault(); | |
e.returnValue = ''; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
$php_main = 'main.php'; | |
if ($_SERVER["REQUEST_METHOD"] == "GET" && isset($_GET['logout'])) { | |
session_start(); | |
session_destroy(); | |
header("Location: $php_main"); | |
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data=[ | |
'staus'=>true, | |
'msg'=>'welcome', | |
]; | |
echo json_encode($data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"author": "Tran Chau", | |
"editor": "wokwi", | |
"parts": [ { "type": "board-esp32-devkit-c-v4", "id": "esp", "top": 0, "left": 0, "attrs": {} } ], | |
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ], | |
"dependencies": {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
// Define the OLED display width and height | |
#define SCREEN_WIDTH 128 | |
#define SCREEN_HEIGHT 64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"author": "cccc", | |
"editor": "wokwi", | |
"parts": [ | |
{ "type": "board-esp32-devkit-c-v4", "id": "esp", "top": -86.4, "left": -23.96, "attrs": {} }, | |
{ | |
"type": "wokwi-relay-module", | |
"id": "relay1", | |
"top": -77.4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//https://github.com/php-mqtt/client/tree/master | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
require('vendor/autoload.php'); |
NewerOlder