久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <bdo id='6ofP9'></bdo><ul id='6ofP9'></ul>
      <i id='6ofP9'><tr id='6ofP9'><dt id='6ofP9'><q id='6ofP9'><span id='6ofP9'><b id='6ofP9'><form id='6ofP9'><ins id='6ofP9'></ins><ul id='6ofP9'></ul><sub id='6ofP9'></sub></form><legend id='6ofP9'></legend><bdo id='6ofP9'><pre id='6ofP9'><center id='6ofP9'></center></pre></bdo></b><th id='6ofP9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6ofP9'><tfoot id='6ofP9'></tfoot><dl id='6ofP9'><fieldset id='6ofP9'></fieldset></dl></div>
      <tfoot id='6ofP9'></tfoot>
    1. <small id='6ofP9'></small><noframes id='6ofP9'>

      1. <legend id='6ofP9'><style id='6ofP9'><dir id='6ofP9'><q id='6ofP9'></q></dir></style></legend>

        使用php、API自動獲取經緯度

        Get latitude and longitude automatically using php, API(使用php、API自動獲取經緯度)

          <tfoot id='5Ao1f'></tfoot>
            <tbody id='5Ao1f'></tbody>

            • <i id='5Ao1f'><tr id='5Ao1f'><dt id='5Ao1f'><q id='5Ao1f'><span id='5Ao1f'><b id='5Ao1f'><form id='5Ao1f'><ins id='5Ao1f'></ins><ul id='5Ao1f'></ul><sub id='5Ao1f'></sub></form><legend id='5Ao1f'></legend><bdo id='5Ao1f'><pre id='5Ao1f'><center id='5Ao1f'></center></pre></bdo></b><th id='5Ao1f'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5Ao1f'><tfoot id='5Ao1f'></tfoot><dl id='5Ao1f'><fieldset id='5Ao1f'></fieldset></dl></div>

              • <bdo id='5Ao1f'></bdo><ul id='5Ao1f'></ul>

                <small id='5Ao1f'></small><noframes id='5Ao1f'>

                <legend id='5Ao1f'><style id='5Ao1f'><dir id='5Ao1f'><q id='5Ao1f'></q></dir></style></legend>
                1. 本文介紹了使用php、API自動獲取經緯度的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在我的一個 php 應用程序中,我必須從地址中找出該地點的緯度和經度.

                  In one of my php applications I have to find out the latitude and longitude of the place from address.

                  我試過這個代碼:

                  $json = file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=$region");
                  $json = json_decode($json);
                  
                  $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
                  $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};
                  

                  但它顯示以下錯誤:

                  警告:file_get_contents(http://maps.google.com/maps/api/geocode/json?address=technopark, Trivandrun, kerala,India&sensor=false&region=IND) [function.file-get-內容]:無法打開流:HTTP 請求失敗!第 4 行 D:Projectslon.php 中的 HTTP/1.0 400 Bad Request

                  Warning: file_get_contents(http://maps.google.com/maps/api/geocode/json?address=technopark, Trivandrun, kerala,India&sensor=false&region=IND) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in D:Projectslon.php on line 4

                  請幫我解決這個問題.

                  推薦答案

                  使用 curl 而不是 file_get_contents:

                  $address = "India+Panchkula";
                  $url = "http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=India";
                  $ch = curl_init();
                  curl_setopt($ch, CURLOPT_URL, $url);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                  curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
                  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                  $response = curl_exec($ch);
                  curl_close($ch);
                  $response_a = json_decode($response);
                  echo $lat = $response_a->results[0]->geometry->location->lat;
                  echo "<br />";
                  echo $long = $response_a->results[0]->geometry->location->lng;
                  

                  這篇關于使用php、API自動獲取經緯度的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    <i id='6C3D6'><tr id='6C3D6'><dt id='6C3D6'><q id='6C3D6'><span id='6C3D6'><b id='6C3D6'><form id='6C3D6'><ins id='6C3D6'></ins><ul id='6C3D6'></ul><sub id='6C3D6'></sub></form><legend id='6C3D6'></legend><bdo id='6C3D6'><pre id='6C3D6'><center id='6C3D6'></center></pre></bdo></b><th id='6C3D6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6C3D6'><tfoot id='6C3D6'></tfoot><dl id='6C3D6'><fieldset id='6C3D6'></fieldset></dl></div>

                    <small id='6C3D6'></small><noframes id='6C3D6'>

                        1. <legend id='6C3D6'><style id='6C3D6'><dir id='6C3D6'><q id='6C3D6'></q></dir></style></legend>
                          <tfoot id='6C3D6'></tfoot>
                            <tbody id='6C3D6'></tbody>
                            <bdo id='6C3D6'></bdo><ul id='6C3D6'></ul>
                          • 主站蜘蛛池模板: 欧美亚洲在线视频 | 精品视频在线观看 | 欧美视频中文字幕 | www亚洲精品 | 久久久.com| 欧美精品一区二区三区四区 在线 | 亚洲乱码国产乱码精品精的特点 | 在线观看亚洲一区二区 | 国产在线观看网站 | 日韩欧美网 | 97国产精品视频人人做人人爱 | 色吧综合| 波多野结衣二区 | 欧美精品一区二区免费 | 欧美激情一区二区三级高清视频 | 日韩免费福利视频 | 国产高清视频 | 三级免费 | www视频在线观看 | 午夜小视频免费观看 | 紧缚调教一区二区三区视频 | 日韩 国产 在线 | 一级国产精品一级国产精品片 | 91精品国产乱码久久久久久 | 亚洲国产中文字幕 | 性天堂网 | 欧美精品a∨在线观看不卡 国产精品久久国产精品 | 99精品免费久久久久久久久日本 | 国产精品久久久久久久久免费 | 亚洲成人中文字幕 | 国产成人高清成人av片在线看 | 欧美一区二区成人 | 午夜精品一区二区三区在线观看 | 91在线电影 | 久久久久久网 | 欧美日韩在线播放 | 成人在线视频免费观看 | 日韩高清一区二区 | 欧美日韩精品一区 | 黄色网址在线免费播放 | 国产精品日韩一区 |