<?php

$url = 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3957.7442741577556!2d112.738373!3d-7.269914699999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2dd7fbe093d00141%3A0xe87d73f1a3a531c1!2sGereja%20Mawar%20Sharon%20Surabaya!5e0!3m2!1sen!2sid!4v1784832949667!5m2!1sen!2sid';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

echo "HTTP STATUS: {$httpCode}\n";
echo "RESPONSE LENGTH: " . strlen((string)$response) . " bytes\n\n";

$keywords = [
    "Google Maps can't load correctly",
    "RefererNotAllowed",
    "Billing",
    "API",
    "Quota",
    "Denied",
    "Development purposes only",
    "Embed API"
];

echo "KEYWORD SEARCH RESULTS:\n";
foreach ($keywords as $kw) {
    $found = (stripos($response, $kw) !== false);
    echo "- '{$kw}': " . ($found ? "FOUND" : "NOT FOUND") . "\n";
}

echo "\nKEY STRUCTURAL ELEMENTS:\n";
echo "- '<div id=\"map\"': " . (stripos($response, '<div id="map"') !== false ? "FOUND" : "NOT FOUND") . "\n";
echo "- 'maps.google.com': " . (stripos($response, 'maps.google.com') !== false ? "FOUND" : "NOT FOUND") . "\n";
echo "- 'viewport': " . (stripos($response, 'viewport') !== false ? "FOUND" : "NOT FOUND") . "\n";
