[Solved] programatically search a place in google map API by passing place name

using JSON <?php function geoPlaceID($location) { $locationclean = str_replace (” “, “+”, $location); $details_url = “https://maps.googleapis.com/maps/api/place/textsearch/json?query=” . $locationclean . “&key=YOUR_KEY”; $du = file_get_contents($details_url); $getDetails = json_decode(utf8_encode($du),true); if ($getDetails[‘status’]==”OK”) { $a=$getDetails[‘results’][1][‘types’]; print_r($a); // echo implode(” “,$a).”<br>”; } else { echo “Place ID not found”; } } geoPlaceID(“kfc”); ?> using XML <?php function place_ID($location) { $locationclean = … Read more