<?php
		
	$y = @$_GET['y'];
	$o = @$_GET['o'];
	$d = @$_GET['d'];
	$h = @$_GET['h'];
	$m = @$_GET['m'];
	$s = @$_GET['s'];
	$timer_state = @$_GET['timer'];
	$message = @$_GET['message'];
	$get = @$_GET['get'];
	
	if($get) { 
		echo file_get_contents('time.txt');
		die();
	}
	if(!strlen($y) || !strlen($o) || !strlen($d) || !strlen($h) || !strlen($m) || !strlen($s) || !strlen($timer_state) || preg_match('/[^0-9]/',$y) || preg_match('/[^0-9]/',$o) || preg_match('/[^0-9]/',$d)  || preg_match('/[^0-9]/',$h) || preg_match('/[^0-9]/',$m) || preg_match('/[^0-9]/',$s) || preg_match('/[^0-9]/',$timer_state)) die('Poorly formed time');
 	
	file_put_contents('time.txt','{"y":"'.$y.'","o":"'.$o.'","d":"'.$d.'","h":"'.$h.'","m":"'.$m.'","s":"'.$s.'","timer":"'.$timer_state.'","message":"'.$message.'"}');
	echo 'success';

