<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[根据高德地图获取经纬度]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[代码编程]]></category>
<pubDate>Wed, 14 Mar 2018 01:42:55 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	<div class="code"><br/>/***********高德地图 根据地址获取经纬度************/<br/>function getCoorByAddr($address)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$key = C(&#039;GAODE_KEY&#039;);<br/>//&nbsp;&nbsp;&nbsp;&nbsp;$key = &#039;d20f62e5a58433a20e75c015a4f054fe&#039;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$url = &quot;http://restapi.amap.com/v3/geocode/geo?key=&#123;$key&#125;&amp;address=&#123;$address&#125;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$arr = file_get_contents($url);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$newarr = json_decode($arr, true);<br/>&nbsp;&nbsp;&nbsp;&nbsp;if($newarr&#91;&#039;info&#039;&#93;==&#039;OK&#039;)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$coor = $newarr&#91;&#039;geocodes&#039;&#93;&#91;0&#93;&#91;&#039;location&#039;&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$coor =explode(&#039;,&#039;,$coor);<br/>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var_dump($coor);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return array(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;coor_x&#039;=&gt;$coor&#91;0&#93;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;coor_y&#039;=&gt;$coor&#91;1&#93;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&#125;<br/></div>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 根据高德地图获取经纬度]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>