<?php
header("Content-Type: application/json");

// Google Places API URL with your key
$url = "https://places.googleapis.com/v1/places/ChIJZQVQt4dtXz4RF-4I8qLmzRE?fields=displayName,rating,reviews&key=AIzaSyDqByzwNha6AU7qvqV9LxleI4_uReVUG9k";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if(curl_errno($ch)){
    echo json_encode(["error" => curl_error($ch)]);
    exit;
}

curl_close($ch);

echo $response;