HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/deltaE/clock_setup.php
<?php
if(!_SERVER("HTTP_REFERER"))
{
	header('HTTP/1.1 403 Forbidden');

	$php_name = _SERVER("SCRIPT_NAME");

	echo "<html>\r\n",
		"<head><title>403 Forbidden</title></head>\r\n",
		"<body>\r\n",
		"<h1>Forbidden</h1>\r\n",
		"<p>You don't have permission to access /$php_name on this server.</p>\r\n",
		"</body></html>\r\n";

	return;
}

function rtc_set_date($date)
{
	$pid_rtc = pid_open("/mmap/rtc0");
	pid_ioctl($pid_rtc, "set date $date");
	pid_close($pid_rtc);
}

$host_time         = _POST("host_time_txt");

rtc_set_date($host_time);

?>
<script>
	window.self.location.replace("clock.php");
</script>