Hey I'm looking for something in PHP

Discussion in 'PHP' started by fordP, May 29, 2007.

  1. #1
    I want to do something like this:
    http://gurus2go.com/zipcode/75227.htm

    I have a computer repair site and I want a script that will generate a page for EVERY zipcode and pull the state name and zipcode onto the page, making a page just like theres for every city.

    Is there a commercial script or free script that does this?
     
    fordP, May 29, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    i'm not quite sure what it that you want. i assume you mean some kind of geo-location based on ip which is fairly easy to do. you can pay for the service or you can scrape a geoip lookup service's page for the location of the current person viewing and then pull the information from a zip code database or something. you really don't need that though the scrap info will give you the city name and everything but it isn't always accurate. anyways, i hope this helps you out some.

    regards,
    ansi
     
    ansi, May 29, 2007 IP
  3. Cesay

    Cesay Peon

    Messages:
    121
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Check out the project at zips.sourceforge.net. There you'll find a mysql database with every major zip code and corresponding city/state (over 30,000 if I remember right). I think the easiest way to do what you're looking for would be to install the zips database and then use mod rewrite to create a new page for zips like yoursite.com/90210.htm or whatever. You could easily grab the city and state info on the fly and wouldn't need an actual web page for each zip; it'd be all dynamic. Btw, I'm the Casey mentioned at the bottom of the page so feel free to ask or pm any questions you may have about the zips. :)
     
    Cesay, May 29, 2007 IP