<?php



   ini_set("log_errors", 1);
	ini_set("error_log", "php-error.log");
	date_default_timezone_set('Asia/Kolkata');


	try{
		
		$data = file_get_contents('php://input');


	$file = fopen("data.txt","a");
	
	$today = date("Y-m-d H:i:s");
	$parameter = "-------------------".$today."----------------------------"."\n";
	fwrite($file, $parameter);
	fwrite($file, $data);
	$parameter = $parameter."-----------------------------------------------"."\n";
    fwrite($file, $parameter);
	fclose($file);
	}

	catch(Exception $err)
	{
		$file = fopen("data.txt","a");
	
	$today = date("Y-m-d H:i:s");
	fwrite($file, $err->getMessage);
		fclose($file);
		

	}



?>