<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 00:51:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Martynas Jusevicius' Blog: Calculating great-circle distance in MySQL and Propel]]></title>
      <guid>http://www.phpdeveloper.org/news/10093</guid>
      <link>http://www.phpdeveloper.org/news/10093</link>
      <description><![CDATA[<p>
In a <a href="http://www.xml.lt/Blog/2008/05/01/Calculating+great-circle+distance+in+MySQL+and+Propel">new post</a> today, <i>Martynas Jusevicius</i> shows how to combine a little SQL magic with the <a href=http://propel.phpdb.org/">Propel</a> framework to fins the distance between two places:
</p>
<blockquote>
Eventually the simple distance formula that I have blogged about turned out to be too inaccurate, even for locations within city bounds. I needed to use a formula to calculate great-circle distance which takes into account that the Earth is a sphere.
</blockquote>
<p>
He includes the SQL to pull the data in the right format and the PHP code (using Propel) to reproduce it without having to write it by hand (complete with the bind variables to help with security and consistency).
</p>]]></description>
      <pubDate>Thu, 01 May 2008 16:08:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Cyberlot's Blog: PHP Extension creating, the quick and dirty.]]></title>
      <guid>http://www.phpdeveloper.org/news/7073</guid>
      <link>http://www.phpdeveloper.org/news/7073</link>
      <description><![CDATA[<p>
On his blog today, <i>Richard Thomas</i> provides <a href="http://www.cyberlot.net/php-extension-creating-quick-and-dirty">his story</a> of writing up a PHP extension "quick and dirty" for a gaming applications he's working on.
</p>
<blockquote>
Its been a while since I last played around with extensions, not since php4 so I scanned through the manual and some only tutorials and threw together this quick and dirty guide to help you get started, again quick and dirty, not a hand holding ends all guide to making an extension, if you don't know some C and php already this is not for you.
</blockquote>
<p>
He <a href="http://www.cyberlot.net/php-extension-creating-quick-and-dirty">walks through</a> the functionality he needed, the simple compile process of it, and the code that combines the two inputted numbers to calculate the "distance".
</p>]]></description>
      <pubDate>Wed, 10 Jan 2007 13:09:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[The OC Food Review Blog: Notes on implementing location based search (part 2 of 2)]]></title>
      <guid>http://www.phpdeveloper.org/news/5734</guid>
      <link>http://www.phpdeveloper.org/news/5734</link>
      <description><![CDATA[<p>
<i>Rahim Sonawalla</i> has posted <a href="http://blog.ocfoodreview.com/2006/06/30/notes-on-implementing-location-based-search-part-2-of-2/">part two</a> of his series on The OC Food Review blog covering the creation of a location-based search using geocoding.
</p>
<blockquote>
We got geocoding out of the way in the first part, so now it's time to talk distances. To figure out how far apart two places are, we could use the traditional method of calculating distances between two points, but that damn Columbus didn't fall off into the Twighlight Zone when he passed the horizon. Turns out the Earth isn't flat, go figure. Oh, and since it isn't flat, assuming that it is will cause your numbers to be off when calculating distances using normal geometry-sometimes by miles.
</blockquote>
<p>
He <a href="http://blog.ocfoodreview.com/2006/06/30/notes-on-implementing-location-based-search-part-2-of-2">links to</a> a <a href="http://mathforum.org/library/drmath/view/51833.html">formula</a> for finding the difference when the distances are short as well as a <a href="http://wantingseed.com/sprout/2003/06/10/distance-between-two-points-on-earth/">PHP implementation</a> of the Haversine formula when the distances get long.
<p>
He <a href="http://blog.ocfoodreview.com/2006/06/30/notes-on-implementing-location-based-search-part-2-of-2">combines this new knowledge</a> with the information already obtained by the geocoding in the <a href="http://www.phpdeveloper.org/news/5727">first part</a> and a SQL database to help narrow down the items in the list. Then, for each of those, he compares the latitude and longitudes to get the difference between them (in miles).
</p>]]></description>
      <pubDate>Fri, 30 Jun 2006 12:05:41 -0500</pubDate>
    </item>
  </channel>
</rss>
