<?php
 // input data through array
$url=$_GET['id'];
if($url){
$ex=explode("=",$url);
$status=$ex[1];


$array = 	array(
	
		"wheel"=>$status
	);

// encode array to json
$json = json_encode($array);

file_put_contents("light.json", $json);
}else{
    $ex=explode("=",$url);
$status=$ex[1];


$array = 	array(
	
		"wheel"=>'stop'
	);

// encode array to json
$json = json_encode($array);

file_put_contents("light.json", $json);
    
}
?>

