Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Robert Cummings
Welcome back Richard :) Cheers, Rob. On Thu, 2007-12-06 at 10:43 -0600, Richard Lynch wrote: > On Thu, December 6, 2007 9:49 am, Jason Pruim wrote: > > > > On Dec 6, 2007, at 10:29 AM, Daniel Brown wrote: > > > >> On Dec 5, 2007 8:58 PM, tedd <[EMAIL PROTECTED]> wrote: > >>> Hi gang: > >>> > >>>

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Daniel Brown
On Dec 6, 2007 11:43 AM, Richard Lynch <[EMAIL PROTECTED]> wrote: > The free one is from an OLD US census, paid for by taxpayers, and > therefore Public Domain. > > $1,000 ones (should) include new zips (lots) and up-to-date population > info etc. Yeah, mine actually does. It's from 2006 and

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Richard Lynch
On Thu, December 6, 2007 9:49 am, Jason Pruim wrote: > > On Dec 6, 2007, at 10:29 AM, Daniel Brown wrote: > >> On Dec 5, 2007 8:58 PM, tedd <[EMAIL PROTECTED]> wrote: >>> Hi gang: >>> >>> I'm entertaining how to determine what zip codes fall within a 50 >>> mile radius of another zip code. >>> >>>

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Daniel Brown
On Dec 6, 2007 11:12 AM, mike <[EMAIL PROTECTED]> wrote: > You can use the formula to figure out how many zip codes are within the radius Or you can stop shooting me in the ass by showing me things that make me wonder why I wasted all that time! ;-P -- Daniel P. Brown [Phone Numbers Go Here

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread mike
You can use the formula to figure out how many zip codes are within the radius Here's a snippet of old code that did that: $radius = 50; // in miles $uchk = db_query("SELECT uz.zip FROM user_zip WHERE uid=$visitor[uid]"); if(db_numrows($uchk) == 1) { list($vz) = d

RE: [PHP] zip codes and lat/longs

2007-12-06 Thread Jay Blanchard
[snip] I'm entertaining how to determine what zip codes fall within a 50 mile radius of another zip code. Anyone done this before? Also, does anyone have any sources for zip codes and lat/long databases? TIA for any help/suggestions. [/snip] Here is a code snip that I use to determine things w

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Daniel Brown
On Dec 6, 2007 11:02 AM, mike <[EMAIL PROTECTED]> wrote: [snip!] > 1) download ZCTA (the text version) from > http://www.census.gov/geo/www/gazetteer/places2k.html [snip!] How you say? Son of the bitch. Well, my database still has more information, including nearby ZIP codes, et cetera.

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread mike
After reading this I decided to figure out what the issue was. It was the MySQL result set. Somehow the columns changed and messed up the float values. So I just whipped this up quick to reload the data (and possibly update it too) Here's the quick-and-dirty: 1) download ZCTA (the text version)

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Daniel Brown
On Dec 6, 2007 10:49 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Dec 6, 2007, at 10:29 AM, Daniel Brown wrote: > > > On Dec 5, 2007 8:58 PM, tedd <[EMAIL PROTECTED]> wrote: > >> Hi gang: > >> > >> I'm entertaining how to determine what zip codes fall within a 50 > >> mile radius of another zi

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Jason Pruim
On Dec 6, 2007, at 10:29 AM, Daniel Brown wrote: On Dec 5, 2007 8:58 PM, tedd <[EMAIL PROTECTED]> wrote: Hi gang: I'm entertaining how to determine what zip codes fall within a 50 mile radius of another zip code. Anyone done this before? Also, does anyone have any sources for zip codes and

Re: [PHP] zip codes and lat/longs

2007-12-06 Thread Daniel Brown
On Dec 5, 2007 8:58 PM, tedd <[EMAIL PROTECTED]> wrote: > Hi gang: > > I'm entertaining how to determine what zip codes fall within a 50 > mile radius of another zip code. > > Anyone done this before? > > Also, does anyone have any sources for zip codes and lat/long databases? Tedd, I hav

Re: [PHP] zip codes and lat/longs

2007-12-05 Thread mike
Here's code I had, but it recently stopped working It takes the zip code for the user and the user you're viewing, looks them up from the data table (z_data_zips) and does the calculation. The formula is in a handful of places - I converted mine from a MySQL example (I think, or vice versa) You c

RE: [PHP] zip codes and lat/longs

2007-12-05 Thread Bastien Koert
hate to say it,but there is lots on google like http://www.code322.com/zipcode_locator.php bastien> Date: Wed, 5 Dec 2007 20:58:52 -0500> To: php-general@lists.php.net> From: [EMAIL PROTECTED]> Subject: [PHP] zip codes and lat/longs> > Hi gang:> > I'm entertaining how to determine what zip c

Re: [PHP] Zip Codes

2004-11-04 Thread Dusty Bin
Brian V Bonini wrote: On Thu, 2004-11-04 at 12:47, Vail, Warren wrote: If you can figure out how to make sense of this, you might be able to find the point that a system is connected to the internet, by tracing back to a visitors current IP address. Which may get you close but either way would pr

RE: [PHP] Zip Codes

2004-11-04 Thread Brian V Bonini
On Thu, 2004-11-04 at 12:47, Vail, Warren wrote: > If you can figure out how to make sense of this, you might be able to find > the point that a system is connected to the internet, by tracing back to a > visitors current IP address. Which may get you close but either way would probably be more i

RE: [PHP] Zip Codes

2004-11-04 Thread Jay Blanchard
[snip] > Thanks for the sarcasm, it definitely helps. > > Why is it that when people ask a question there is always someone that has > a smartass answer? > It keeps us on our toes. Someone's gotta do it. [/snip] It would be a terrible thing to arrive one day, open the list, and see that everyone

Re: [PHP] Zip Codes

2004-11-04 Thread Matthew Sims
> Thanks for the sarcasm, it definitely helps. > > Why is it that when people ask a question there is always someone that has > a smartass answer? > It keeps us on our toes. Someone's gotta do it. -- --Matthew Sims -- -- PHP General Mailing List (http://www.php.net/) T

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
Because for some of us, that part of our body is the smartest thing we have going, and the rest of us is not engaged in the question. Warren Vail -Original Message- From: bb9876 [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 9:41 AM To: [EMAIL PROTECTED] Subject: Re: [PHP

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
the list informed. Warren Vail -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 9:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Zip Codes bb9876 wrote: > Is there any way to use PHP to determine the zip code someone is > visitin

Re: [PHP] Zip Codes

2004-11-04 Thread bb9876
Thanks for the sarcasm, it definitely helps. Why is it that when people ask a question there is always someone that has a smartass answer? "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thursday 04 November 2004 16:59, bb9876 wrote: > > Is there any way to use PHP t

Re: [PHP] Zip Codes

2004-11-04 Thread Matthew Weier O'Phinney
* Bb9876 <[EMAIL PROTECTED]>: > "John Nichel" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > bb9876 wrote: > > > Is there any way to use PHP to determine the zip code someone is > > > visiting > > > from, assuming they are all from the US? > > > > > > > Outside of asking the visi

Re: [PHP] Zip Codes

2004-11-04 Thread bb9876
Okay, I run a movie news site and wanted to use it to make it even quicker for users to find movie times in their area whether they were logged in or not, but that's the way it goes. Thanks fo rthe replies. "John Nichel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bb9876 wrote:

Re: [PHP] Zip Codes

2004-11-04 Thread Jason Wong
On Thursday 04 November 2004 16:59, bb9876 wrote: > Is there any way to use PHP to determine the zip code someone is visiting > from, assuming they are all from the US? Something like this should work: -- start Please input zipcode -- end -- Jason Wong -> Gremlins Associat

Re: [PHP] Zip Codes

2004-11-04 Thread John Nichel
bb9876 wrote: Is there any way to use PHP to determine the zip code someone is visiting from, assuming they are all from the US? Outside of asking the visitor for it, no. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Zip Codes

2004-11-04 Thread Greg Donald
On Thu, 4 Nov 2004 08:59:50 -0800, bb9876 <[EMAIL PROTECTED]> wrote: > Is there any way to use PHP to determine the zip code someone is visiting > from, assuming they are all from the US? http://www.usps.com/webtools/ -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://desti

RE: [PHP] Zip Codes

2004-11-04 Thread Jay Blanchard
[snip] Is there any way to use PHP to determine the zip code someone is visiting from, assuming they are all from the US? [/snip] You would have to determine their IP, which, some being dynamically assigned at log on, would not necessarily indicate the users location. Then you would have to be abl

RE: [PHP] Zip Codes

2004-11-04 Thread Vail, Warren
Do you mean other than asking them, like using their IP address? Warren Vail -Original Message- From: bb9876 [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 9:00 AM To: [EMAIL PROTECTED] Subject: [PHP] Zip Codes Is there any way to use PHP to determine the zip code someone