You are here: Re: Search by zip code « PHP Programming Language « IT news, forums, messages
Re: Search by zip code

Posted by Shelly on 07/07/05 14:49

"Manuel Lemos" <mlemos@acm.org> wrote in message
news:daiher$u6u$1@domitilla.aioe.org...
> Hello,
>
> Shelly wrote:
>> Does anyone know if there are any modules available that enable searches
>> by zipcode for proximity? I want the user to enter a zipcode and then I
>> want to somehow search for all entries in a database that are within,
>> say, 25 miles of that zipcode. This is done in many, many sites on the
>> net and I am wondering if anyone knows of an add-on package to make it
>> happen. No sense in re-inventing the wheel.
>
> Sure, try either of these packages:
>
> Class: php Zip Locator
> http://www.phpclasses.org/phpziplocator
>
> Class: Zip Codes Range
> http://www.phpclasses.org/zipcodesrange
>
> --
>
> Regards,
> Manuel Lemos

Thank you. I recently subscribed to PHPclasses. The
http://www.phpclasses.org/zipcodesrange
looks like exactly what I need. I do need a little education, however. So,
if you could either point me to the proper place or explain it to me, I
would be appreciative.

1 - That class has a require of DB.php. There was none in the download.
Where can I find that one.

2 - It has the the syntax "$db =& DB::connect(DSN);" . What is the
"::"? What is the "DB"?

3 - DSN was defined as "define ('DSN', 'pgsql://user@localhost/database');".
Can you explain the second argument? It look like a URL.

4 - In using this class, do I simply create a variable with something like:
$my_var = new ZipCodesRange(<the arguments>);
and then access the zipcodes that satisfy as:
$my_var->zipcodes[$i] ?

5 - Can the zipcode table simply be a table in my main database?

These may seem like obvious questions to you, but it is questions like these
that have blocked my using the PHPclasses stuff. It seem like an
exceptionally rich collection of material.

Thanks,
Shelly

 

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

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