retrieve points of interests (attractions/tourist places) of a place/country using google places api

前端 未结 5 2228
故里飘歌
故里飘歌 2020-12-05 16:37

I want to retrieve points of interests of a place/country through google places api say \'points of interests in london\'. I want the results to be same as I google search

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-05 17:00

    Please tied to use google API

    1. Step 1 : Create Google API key Get API Key
    2. Step 2: Add Places API
    3. Step 3: Implement

    $url= "https://maps.googleapis.com/maps/api/place/textsearch/json?query=dubai+point+of+interest&language=en&radius=2000&key=API_KEY";

    $json=file_get_contents($url);
    
    $obj = json_decode($json);
    
    print_r($obj);
    

提交回复
热议问题