API: details

<?php
header('Access-Control-Allow-Origin: *');

$placeid = $_REQUEST['placeid'];

$key = $_REQUEST['key'];	// Replace with $key = YOUR_API_KEY


if($placeid=='') $placeid="ChIJK6v1W2cSAHwRK4VkZ1O45Fw";	//	Shack Hawaii Kai

if($key>'')
{
	$url="https://maps.googleapis.com/maps/api/place/details/json?key=$key";

	$url .= "&placeid=$placeid";

	$ch = curl_init($url); 
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

	$data = curl_exec($ch);
	curl_close($ch);

	$json = json_decode($data);
	
	$result = $json -> {'result'};

	$out= json_encode( [ "result" => $result ], JSON_PRETTY_PRINT );

	header('Content-Type: application/json');
	echo $out;
}
?>