<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP Geocoding tutorial with the Google Maps API &#8211; Part One</title>
	<atom:link href="http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/</link>
	<description>Tutorials, Polemics, and Discussion about all things web-nerdy</description>
	<lastBuildDate>Thu, 06 May 2010 15:46:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brad Wedell</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6064</link>
		<dc:creator>Brad Wedell</dc:creator>
		<pubDate>Thu, 06 May 2010 15:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6064</guid>
		<description>Quick update, have spoken with Monte and have changed the URL for the Google Code repository:  the new url is http://code.google.com/p/php-google-map-api - sorry for the confusion!</description>
		<content:encoded><![CDATA[<p>Quick update, have spoken with Monte and have changed the URL for the Google Code repository:  the new url is <a href="http://code.google.com/p/php-google-map-api" rel="nofollow">http://code.google.com/p/php-google-map-api</a> &#8211; sorry for the confusion!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Wedell</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6062</link>
		<dc:creator>Brad Wedell</dc:creator>
		<pubDate>Mon, 03 May 2010 15:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6062</guid>
		<description>I just released an updated version of the PHPGoogleMapAPI (which I have coined PHPGoogleMapAPIv3).  The original version from Monte Ohrt was pretty powerful, and I have gone ahead and updated it to use the new V3 of the Google Maps APIs.  With this class, if you wanted to do a geocoding request, you would simply do:

$map_object = new GoogleMapAPI();
$geo_coords = $map_object-&gt;getGeocode($address);

if( $geo_coords != false ){
  echo $geo_coords[&quot;lat&quot;];
  echo $geo_coords[&quot;lon&quot;];
}

The code can be found at http://code.google.com/p/phpgooglemapapiv3/</description>
		<content:encoded><![CDATA[<p>I just released an updated version of the PHPGoogleMapAPI (which I have coined PHPGoogleMapAPIv3).  The original version from Monte Ohrt was pretty powerful, and I have gone ahead and updated it to use the new V3 of the Google Maps APIs.  With this class, if you wanted to do a geocoding request, you would simply do:</p>
<p>$map_object = new GoogleMapAPI();<br />
$geo_coords = $map_object-&gt;getGeocode($address);</p>
<p>if( $geo_coords != false ){<br />
  echo $geo_coords["lat"];<br />
  echo $geo_coords["lon"];<br />
}</p>
<p>The code can be found at <a href="http://code.google.com/p/phpgooglemapapiv3/" rel="nofollow">http://code.google.com/p/phpgooglemapapiv3/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stu D'Alessandro</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6061</link>
		<dc:creator>Stu D'Alessandro</dc:creator>
		<pubDate>Wed, 28 Apr 2010 21:24:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6061</guid>
		<description>Chicago, I believe you want to specify json as the output format, otherwise looks great.

$url = &quot;http://maps.google.com/maps/geo?q=&quot;.$address.&quot;&amp;output=json&amp;key=&quot;.$key;

Thanks Tim et al for a super helpful article!!</description>
		<content:encoded><![CDATA[<p>Chicago, I believe you want to specify json as the output format, otherwise looks great.</p>
<p>$url = &#8220;http://maps.google.com/maps/geo?q=&#8221;.$address.&#8221;&amp;output=json&amp;key=&#8221;.$key;</p>
<p>Thanks Tim et al for a super helpful article!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chicago Web Developer</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6058</link>
		<dc:creator>Chicago Web Developer</dc:creator>
		<pubDate>Sat, 27 Mar 2010 04:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6058</guid>
		<description>HERE IS UPDATED CODE SINCE THE API HAS CHANGED!

&lt;?
//Set up our variables
$longitude = &quot;&quot;;
$latitude = &quot;&quot;;
$precision = &quot;&quot;;

//Three parts to the querystring: q is address, output is the format (
$key = &quot;YOUR API KEY HERE&quot;;
$address = urlencode(&quot;columbia MO&quot;);
$url = &quot;http://maps.google.com/maps/geo?q=&quot;.$address.&quot;&amp;output=csv&amp;key=&quot;.$key;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[&quot;HTTP_USER_AGENT&quot;]);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$data = curl_exec($ch);
curl_close($ch);

$geo_json = json_decode($data, true);

print_r($geo_json);

if ($geo_json[&#039;Status&#039;][&#039;code&#039;] == &#039;200&#039;) {

$precision = $geo_json[&#039;Placemark&#039;][0][&#039;AddressDetails&#039;][&#039;Accuracy&#039;];
$latitude = $geo_json[&#039;Placemark&#039;][0][&#039;Point&#039;][&#039;coordinates&#039;][0];
$longitude = $geo_json[&#039;Placemark&#039;][0][&#039;Point&#039;][&#039;coordinates&#039;][1];

echo &quot;Precision: $precision \n&quot;;
echo &quot;Latutide: $latitude \n&quot;;
echo &quot;Longitude: $longitude \n&quot;;

} else {
echo &quot;Error in geocoding! Http error &quot;.substr($data,0,3);
}</description>
		<content:encoded><![CDATA[<p>HERE IS UPDATED CODE SINCE THE API HAS CHANGED!</p>
<p>&lt;?<br />
//Set up our variables<br />
$longitude = &quot;&quot;;<br />
$latitude = &quot;&quot;;<br />
$precision = &quot;&quot;;</p>
<p>//Three parts to the querystring: q is address, output is the format (<br />
$key = &quot;YOUR API KEY HERE&quot;;<br />
$address = urlencode(&quot;columbia MO&quot;);<br />
$url = &quot;http://maps.google.com/maps/geo?q=&quot;.$address.&quot;&amp;output=csv&amp;key=&quot;.$key;</p>
<p>$ch = curl_init();</p>
<p>curl_setopt($ch, CURLOPT_URL, $url);<br />
curl_setopt($ch, CURLOPT_HEADER,0);<br />
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[&quot;HTTP_USER_AGENT&quot;]);<br />
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);</p>
<p>$data = curl_exec($ch);<br />
curl_close($ch);</p>
<p>$geo_json = json_decode($data, true);</p>
<p>print_r($geo_json);</p>
<p>if ($geo_json[&#039;Status&#039;][&#039;code&#039;] == &#039;200&#039;) {</p>
<p>$precision = $geo_json[&#039;Placemark&#039;][0][&#039;AddressDetails&#039;][&#039;Accuracy&#039;];<br />
$latitude = $geo_json[&#039;Placemark&#039;][0][&#039;Point&#039;][&#039;coordinates&#039;][0];<br />
$longitude = $geo_json[&#039;Placemark&#039;][0][&#039;Point&#039;][&#039;coordinates&#039;][1];</p>
<p>echo &quot;Precision: $precision \n&quot;;<br />
echo &quot;Latutide: $latitude \n&quot;;<br />
echo &quot;Longitude: $longitude \n&quot;;</p>
<p>} else {<br />
echo &quot;Error in geocoding! Http error &quot;.substr($data,0,3);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6044</link>
		<dc:creator>Ray</dc:creator>
		<pubDate>Sun, 15 Nov 2009 00:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6044</guid>
		<description>You beautiful little coder you, it still works, thanks so far. But where would I put the sleep(1); command? I do not really see any place to put it where it would cause any effect. As I imagine the 300 are accessing the site each second, thus making the whole process an instant kill victim by Google. I&#039;d have to split up the requests among and route them to a couple of dozen physically different servers returning the geocoding results, to make the kill access menace go away theoretically.</description>
		<content:encoded><![CDATA[<p>You beautiful little coder you, it still works, thanks so far. But where would I put the sleep(1); command? I do not really see any place to put it where it would cause any effect. As I imagine the 300 are accessing the site each second, thus making the whole process an instant kill victim by Google. I&#8217;d have to split up the requests among and route them to a couple of dozen physically different servers returning the geocoding results, to make the kill access menace go away theoretically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GeoCoding in PHP &#124; Things I Forgot</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-6033</link>
		<dc:creator>GeoCoding in PHP &#124; Things I Forgot</dc:creator>
		<pubDate>Mon, 15 Jun 2009 16:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-6033</guid>
		<description>[...] an excellent article by Tim Showers, here are my notes on [...]</description>
		<content:encoded><![CDATA[<p>[...] an excellent article by Tim Showers, here are my notes on [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hung Nguyen</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-2094</link>
		<dc:creator>Hung Nguyen</dc:creator>
		<pubDate>Wed, 25 Feb 2009 02:03:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-2094</guid>
		<description>This is what i&#039;ve been looking for, you save my day

LEGEND!</description>
		<content:encoded><![CDATA[<p>This is what i&#8217;ve been looking for, you save my day</p>
<p>LEGEND!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt Reinholtz</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-2093</link>
		<dc:creator>Kurt Reinholtz</dc:creator>
		<pubDate>Wed, 18 Feb 2009 00:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-2093</guid>
		<description>Very nice, thank you. Elegant solution saved me a lot of time. Very much appreciated!</description>
		<content:encoded><![CDATA[<p>Very nice, thank you. Elegant solution saved me a lot of time. Very much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kailash Dave</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-78</link>
		<dc:creator>Kailash Dave</dc:creator>
		<pubDate>Wed, 17 Sep 2008 06:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-78</guid>
		<description>Many thanks Sir :)
It is realy very helpful for the developers to done with the integration part without waisting much to do so :)

Regards

KD</description>
		<content:encoded><![CDATA[<p>Many thanks Sir <img src='http://www.timshowers.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It is realy very helpful for the developers to done with the integration part without waisting much to do so <img src='http://www.timshowers.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards</p>
<p>KD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Jackson</title>
		<link>http://www.timshowers.com/2008/08/php-geocoding-tutorial-with-the-google-maps-api-part-one/comment-page-1/#comment-46</link>
		<dc:creator>Alan Jackson</dc:creator>
		<pubDate>Mon, 08 Sep 2008 01:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.timshowers.com/?p=85#comment-46</guid>
		<description>Tim,

Many thanks. I have tried many ways to do exactly this. My PHP is on an up an coming level so far. I got to the point in my head of what I needed to retrieve, the fact that I would need to explode it and got an URL working just didn&#039;t know how to go about getting the information from Google.  

With this code I feel I can finally get over that &quot;hump&quot;.

-Alan</description>
		<content:encoded><![CDATA[<p>Tim,</p>
<p>Many thanks. I have tried many ways to do exactly this. My PHP is on an up an coming level so far. I got to the point in my head of what I needed to retrieve, the fact that I would need to explode it and got an URL working just didn&#8217;t know how to go about getting the information from Google.  </p>
<p>With this code I feel I can finally get over that &#8220;hump&#8221;.</p>
<p>-Alan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
