You are here: Re: [PHP] geographic search engine « PHP « IT news, forums, messages
Re: [PHP] geographic search engine

Posted by Richard Lynch on 10/02/98 11:05

symbulos partners wrote:
>> So often php-general is graced with the presence of people with
>> multiple personalities.. or are you really the borg? :)
>
> What??

You used "we" a lot in your post.

>>> Any body has any experience with anything similar?
>>
>> I coded a zip code to distance calculater last week.
>>
>> x = 69.1 * ( zip2.lat - zip1.lat )
>> y = 69.1 * ( zip2.lon - zip1.lon ) * cos( zip1.lat / 57.3 )
>> miles = sqrt( x^2 + y^2 )
>>
>> This does not take into account the curve of the earth. In addition
>> you'll need a db with the latitude and longitude for each zip code.
>
> Does it work for UK postcodes? Where do you find UK post codes to latitude
> databases?

For KMS instead of miles, change 69.1 to, err, some other magic number.

Do the math. :-)

I don't know of any free UK databases. Yet. :-)


--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация