Zip Code Lookup

Hi guys,
Ok, I've had a project dumped on me that is ridiculously
complicated given my level of ability. I've explained to them that
I am NOT the guy for this. They're in a real jam though, so while
they're trying to find someone else I told them I'd see what I can
do.
Basically, it's a political action page. You watch a short
flash video, then click a button to send email to the candidates
running to represent you. It's been built (kind of) using PHP by
someone else, but has so many bugs (and I don't know anything about
PHP) that I think my only hope is to try and re-write the whole
thing in Coldfusion (which I know the basics of).
Thankfully the mySQL database is already done and working. I
just need to build the pages. The real sticking point: on the "tell
a candidate" page, they want a user to fill out their street
address, click a button, and have the application automatically
find their full zipcode and then display a page listing the
candidates running to represent that district (this is limited to
one state, thank god).
I can handle the database-driven stuff to return email links
for their candidates (I think)... but how can I use Coldfusion to
find a person's full zipcode based on their street address?
Thanks for ANY ideas... the more dumbed-down the better!
Joe

It's no big deal, StearmanDriver. You already have a good
solution. Yahoo!
All you have to do is
get a
Yahoo App ID. You can then use it with, for example, the cfhttp
tag to get the zip code. The service is free, too.
Suppose your Yahoo App ID is
vmuNNhtDEr32Ms8pmwEyvoAdClQQabcploMMth2iY_GXMK456Mruav56P09iuQk7.BBFtC--.
(This is a fake ID I've just created to illustrate the process. But
it is similar to the one Yahoo will send you.) Suppose also that
you wished to know the zip code of the Hilton Garden Inn Hotel in
Commercial Street, Portland, Maine.
The result, cfhttp.FileContent, is a short XML document.
However, it gives you more bang for your buck
(see actual result below). It includes, besides the zip, the
latitude and longitude of the place.
To get the zip code, simply parse the XML. The complete code
is something like the one below.
actual result, cfhttp.fileContent:
<?xml version="1.0" ?>
<ResultSet xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:yahoo:maps" xsi:schemaLocation="urn:yahoo:maps
http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd">
<Result precision="address">
<Latitude>43.657646</Latitude>
<Longitude>-70.250313</Longitude>
<Address>65 Commercial St</Address>
<City>Portland</City>
<State>ME</State>
<Zip>04101-4703</Zip>
<Country>US</Country>
</Result>
</ResultSet>
<!-- ws07.search.re2.yahoo.com compressed/chunked Sun Oct
5 00:10:51 PDT 2008
-->

Similar Messages

  • Zip Code reverse lookup

    I have created a feedback form for visitors to an airshow and the results are shown here http://hollisterairshow.com/feedback-results.php. I would like to add a column beside the zip code showing the city. On looking around I have found several free zip code lookup sites and temporarily added a link to one of these on the feedback results page,  but I think my users would find it more useful if I just show the city alongside the zip code. I'd really appreciate suggestions on how to do this.
    Thanks.
    Tony

    Never mind. I found a downloadable list of 5 digit zip codes with city/ state so imported it (all 42,000+ entries) into a table on an existing db.

  • Reverse lookup by zip code

    is there a way to enter the zip code (in address book) and have it automatically lookup and enter city and state into the proper filds?....... maybe even the plus four extension

    This is a great example of a requirement for an Address Book plug-in. The difficulties with writing a reliable, functional one are several, however. I've toyed with the concept, but quickly became frustrated with the variables and the relatively unpredictable response to queries, even accurate, highly structured queries: the kind user are unlikely to perform.
    First, you have the multiple city [both valid and invalid] response from the USPS for any given five-digit ZIP in inquiry. Which would you pick from a multiple response list? [Most queries result in a list in my experience, and not in a single matching record.] The first? Or, would you offer a user the choice to pick any of the valid cities on the list?
    Second, since the ZIP plus 4 requires address matching by street number, street name and apartment, suite or other sub-unit, how would you handle the multiple page responses from USPS which are typical for 'almost complete' but not absolutely matching addresses in the database?
    Frankly, it's much easier to simply query the information here for associated cities and states…
    http://zip4.usps.com/zip4/citytown_zip.jsp
    …or, here, for ZIP plus 4 matches:
    http://zip4.usps.com/zip4/welcome.jsp
    You can then very quickly pick from a list of possible matches and enter the data in your Address Book records. Some processes are simply far easier to achieve on a non-automated, human basis than by running a script or application. This is probably one of those.

  • How do I display an invalid zip code in a summary table

    On my airshow website we have a feedback form, one of the questions is the zipcode where the visitor came from. This works fine. The summary results tab includes a lookup for the zipcode where I show the city associated with the zipcode and then how many responses came from that zipcode. This can be seen here http://www.hollisterairshow.com/feedback-results.php?tab=7
    In testing, I found that an invalid zipcode is not displayed in the summary table, although it is counted in the total number of responses. I'd like to display the invalid zipcode and leave the City blank, or maybe put "Invalid zip code". The current code is displayed below, it's beyond my ability to figure out how I should change it to display invalid zipcodes and I'd really appreciate some direction on this.
    I know I could validate the zipcode on entry but it's quite possible the zipcode table I have is out of date and i can't find a free downloadable list, so I'm thinking anything invalid could cause me to update my table.which is fine.
    Thanks for any assistance.
    Tony
    <div class="TabbedPanelsContent">
    <?php
    // Make a MySQL Connection
    $query = "SELECT feedback.zip, COUNT(feedback.zip), zipcodes.citystate FROM feedback, zipcodes WHERE feedback.zip = zipcodes.zipcode GROUP BY feedback.zip";
    $result = mysql_query($query) or die(mysql_error());
    // Print out result
    while($row = mysql_fetch_array($result))
    echo $row['zip']. " ". $row['COUNT(feedback.zip)']. " ". $row['citystate'];
    echo "<br />";
    ?>
    </div>

    Use an outer join on the two tables so that results are returned for all feedback rows, instead of just matching rows. The column zipcodes.citystate will be NULL. In your recordset output, you can test for null in the column and populate it with "Invalid Zipcode" if you want.
    You'll need to move the join to the FROM clause as I believe that MySQL does not support outer joins in the WHERE clause like most other DBMS's.

  • Zip Code Locator / Store Locator

    Guys,
    I want to write a simple store-locator functionality in my website (Using a Mysql db with JSP-java etc.,)
    I am not sure of the tools I need and how to approach the problem (once I get a Map of all the zip codes)... Please throw in some ideas that can help me on this...
    Thanks a ton!

    The earth is ~ 40,000 km equatorial circumference
    Mapped as rectangular projection ignoring poles is 40,000 km x 16,000 km = 640,000,000 1km x 1km cells
    so 1 byte/km2 = 640 MB
    or 1 word/(250m x 250m) = 4*4*4*640MB = 40GB
    So a reasonable brute force method for the planet (and a few big memory servers or a not very big fast disk) would work in most cases.
    Obviously, if you're only interested in one part of the globe you scale down.
    The USA is something like 10,000 km square so a �60 520GB disk would give you a 1/sqrt(500E9/4/(10E6m^2)) = 28m resolution lookup at < 10ms time per request.
    A second lookup of the id returned from the big bitmap using the nearest neighbour approach for a few points would take you further, if required.
    How much is your time worth to develop an efficient solution, if throwing �60 of hardware at it would be good enough?
    Short of buying an awful lot of memory, any solution will hit the disk at least once (though you may be able to optimise away seeking, it's a query and won't be streaming whatever you do), so the overall time isn't likely to get much better without a lot of effort.
    You can always trade off between the bitmap/localised query for space and speed.
    Pete

  • Expression - Zip Code validation

    We have the field called Zip Code and this is a text field and 10 Chrs long.
    Field 1:  State
    Field u2018Stateu2019 is a lookup field and  the lookup table has Country, state code and state name.
    Field 2:  Zip Code
    Zip Code = text field and the length is 10 chrs.
    The ZIP Code Validation should be either NNNNN format (Block of 5 digits) for standard ZIP Code OR
    NNNNN-NNNN format (Block of 5 and 4  digits) for ZIP+4 format
    For example, if the country = US and state = IL then the first digit of the postal code field will be 6 then remaining 4 digits must be numeric for the standard 5 digit Zip code.
    Can anybody help me to write the expression. Full points will be rewarded.

    Hi,
    Try this it should work,
    For example, if the country = US and state = IL then the first digit of the postal code field will be 6 then remaining 4 digits must be numeric for the standard 5 digit Zip code.
    I am assuming here State = IL indicates state code = IL which is field in your Lookup table. As you said your Lookup table having fields Country, state code and state name
    IF(FIND(State.Country, "US") AND FIND(State.state code, "IL"), LEFT(Zip Code,1)=6 AND HAS_ALL_CHARS(RIGHT(Zip Code,4),0,9), FALSE)
    otherwise if your State having IL value is simple text field in maintable then replace it as
    IF(FIND(State.Country, "US") AND FIND(State, "IL"), LEFT(Zip Code,1)=6 AND HAS_ALL_CHARS(RIGHT(Zip Code,4),0,9), FALSE)
    Hope it will Help you,
    Rewards if Useful......
    Mandeep Saini

  • Zip code API

    Can anyone tell me of an API to handle US zip codes. In particular, I would like a 'reverse lookup', ie, given a zip code, get the city/state.

    In my area it is quite possible to reverse a zip code
    and get a city and yet the address is not in fact in
    the city.
    So that might be sufficient for example to auto-fill
    city/state for a addess form but it would most
    definitely not work if you were adding tax based on
    city.Doesn't work in the insurance world either, when calculating premium is based on a territory code which is returned by a combo of city/county/zip. (We've gone through lots of different vendors for this particular item....)

  • Trying to set download apps...says it needs my credit card info...I put it in....but then it won't take it because it says I need to enter my zip code.  I live in Canada and have a postal code, not a zip code.  Help

    I am trying to set up my new Iphone 4 and download apps.  I made an Apple Id which is all good.  But when I try and enter in my credit card info it keeps asking for my Zip code and state.  I live in Canada not US.  I changed the phone to Canadian but it still keeps asking for it and won't let me put in my right information which in turn won't let me download any apps.  Can anyone help?

    Postal & Zip codes are same.  Just enter postal code without space.  It will accept.

  • Is there a way of adding a zip code locator

    I'm doing a website for a business with 6 locations and would like for the customer to be able to type in their zip code to find the closest store in their area.
    I've done a custom google map usng (mapsenginelite) but would like to add some how the zip code locator. Any help would be much appreciated.
    Here's the site I've been working on http://www.cortezautopros.com/locations.html
    Thanks Ben

    This free extension may help http://www.dmxzone.com/go/21863/html5-data-bindings

  • Firefox will not allow me to change the zip code on the Walmart website.

    When I follow a link to Walmart it automatically puts in an incorrect My Store location and zip code. I change it, close Firefox, re-open and try again. Same thing. It does not do that with other browsers. I have removed cookies several times, I have uninstalled and reinstalled Firefox but nothing seems to work.

    Details like this are stored in a cookie.
    Try to "Remove Cookies" Walmart cookies and check that they are still gone after closing and restarting Firefox:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Also make sure to close all tabs with the Walmart site to prevent Firefox from storing them in the sessionstore.js file as part of session data.
    It is possible that the <i>cookies.sqlite</i> file that stores the cookies is corrupted if clearing cookies doesn't work.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookies files like <b>cookies.sqlite-journal</b> in the Firefox profile folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies
    You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make a note of those passwords and bookmarks.
    You can't recover from this 'forget' unless you have a backup of the involved files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • No longer get a Signal. My zip code is 32421 in NW Florida

    My zip code is 32421 in NW Florida, Just about the middle of the map, just below Interstate 10. I have been with Verizon since it took a portion of ALLTEL, was with Alltel since they took over another company and was with that company when they took over one. I have not personally changed providers in at least 15 years or more. My problem now is that my signal strength has become almost nonexistent where I have always been all these years. It seems like the fall of 2013 I had good signal but it started dropping. I finally change from a Motorola Maxx (I think it was) and now my wife has a Samsung Galaxy S3 and I have the S4. The other 2 phones on our contract (grandkids) both Apple 4's have the same problem. My son and his wife, who live next door and with Verizon also have the same problem and timeline. It is like a tower(s) have been out of commission for a while. My phone roams at times while in the house. If I have my phone set to announce when it loses the network or regains the network, it became to irritating to have to hear it. At one point we could almost use our cell phones exclusively at home. Now we are bound to landlines. I've never had any problem with Verizon but have become quite upset during the last 6 months to the point of trying something different when our contract expires. We are no longer getting the service we were getting with earlier contracts. Please help. Tell us what we can do or what Verizon is going to do to check this out.

    The signal is ever so slightly higher outside as would be expected, but still not high enough, often enough to be depended on. In fact it is more prone to roam when stepping out of the house than inside. I have to drive several miles Northwest (approximately 7 miles) towards the intersection of Interstate 10 and SR 71 in the panhandle of Florida, just south of the town, Marianna. When heading east on SR 286 from SR69, through the Ochessee area to I-10 and then heading east for about 10 miles from the Apalachicola River are several dropout areas of low to no signal, but since we're moving it is for a very brief period of time. Getting back to my house though, the service that I had as late as last summer, both inside and out, has significantly declined.  Just based on my driving from my house, it seems that a tower North of me has dropped. You can find these roads on Google maps, in fact you can find them by zooming in on the Verizon Coverage map, find Tallahassee in North Florida and follow Interstate 10 to the west for about 50 miles. The problem seems to be from SR 286 to SR 69 then to SR71. Along a stretch about 17 miles south of Interstate 10 in between these 3 intersections is where the problem seem most prevalent.
    I'm not sure what you meant by follow and send a private message. The only option I see for me is "Reply". Please excuse my ignorance.

  • Retrieve city and state from zip code that is entered by user

    I am trying to use AJAX to retrieve city and state from a table based on a zip code that is entered by the user. Two are text fields (zip code and city) and one is a SELECT field (state).
    1. I defined an application item called TEMPORARY_APPLICATION_ITEM.
    2. I defined an application process called SET_CITY_STATE as follows:
        a. Process point: on demand
        b. type: anonymous block
        c. process text:
    <pre>
    DECLARE
    v_city VARCHAR2 (100);
    v_state VARCHAR2 (2);
    CURSOR cur_c
    IS
    SELECT city, state
    FROM ZIP
    WHERE zip = v ('TEMPORARY_APPLICATION_ITEM');
    BEGIN
    FOR c IN cur_c
    LOOP
    v_city := c.city;
    v_state := c.state;
    END LOOP;
    apex_util.set_session_state('P2_CO_CITY',v_city);
    apex_util.set_session_state('P2_CO_STATE',v_state);
    EXCEPTION
    WHEN OTHERS
    THEN
    apex_util.set_session_state('P2_CITY','Unknown city');
    apex_util.set_session_state('P2_STATE',null);
    END;
    </pre>
    3. Javascript is defined in the region header:
    <pre>
    <script language="JavaScript" type="text/javascript">
    <!--
    function pull_city_state(pValue){
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_City_State',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM',pValue)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM','null')
    gReturn = get.get('XML');
    get = null;
    //-->
    </script>
    </pre>
    4. In the HTML Form Element Attributes of the P2_CO_ZIP text item: onchange="pull_city_state(this.value)";
    The city and state are not being populated. I checked the select statement and it is retreiving the city and state in SQL WORKSHOP > SQL COMMANDS.
    I would like to use it for the mailing address as well, so I would need to make the application process / javascript a bit more generic to be used in two places.
    I placed the application on apex.oracle.com:
    Workspace: RGWORK
    Application: Online Certification Application (28022)
    Can someone assists, please.
    Thank you,
    Robert
    Edited by: sect55 on Jun 2, 2009 4:11 PM

    Hi Robert,
    Try using XML instead of session state -
    Change the application on demand process with the following script -
    >
    DECLARE
    v_city VARCHAR2 (100);
    v_state VARCHAR2 (2);
    CURSOR cur_c
    IS
    SELECT city, state
    FROM ZIP
    WHERE zip = v ('TEMPORARY_APPLICATION_ITEM');
    BEGIN
    FOR c IN cur_c
    LOOP
    v_city := c.city;
    v_state := c.state;
    END LOOP;
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P2_CO_CITY">' || v_city || '</item>');
    HTP.prn ('<item id="P2_CO_STATE">' || v_state || '</item>');
    HTP.prn ('</body>');
    EXCEPTION
    WHEN OTHERS
    THEN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P2_CITY">' || 'Unknown city' || '</item>');
    HTP.prn ('<item id="P2_STATE">' || '' || '</item>');
    HTP.prn ('</body>');
    END;
    >
    in your javascript make sure you typing the application process name correctly as it is case sensitive.
    Hope this helps,
    Regards,
    M Tajuddin
    web: http://tajuddin.whitepagesbd.com

  • Values not showing up for 3 digit zip code maps of states

    I've been tinkering with an app that displays the US, with a query that shows how many folks we have in each state. The link takes you to a page that displays the state/zip code style map. On the map of the US, I can see the label and the value from the query for all states. But in the state map, all that shows up are the labels. I have the map set to show values, but they won't display.
    I'm using APEX 4.0.1 in a 10.2.0.4 database running on Windows.
    Any thoughts?

    Hi mjblake,
    The Map Region columns (i.e. REGION_NAME, REGION_ID, etc) can vary for each Map source .amap file. So it's definitely worth referencing the AnyChart Map Reference Information when you're adding your map series query, to ensure that your query is referencing data that's actually contained in your chosen .amap file.
    By default, the wizard will set the "Map Region Column" to REGION_NAME, as this the default AnyChart column. However, some maps, like the US State Zipcode maps, don't actually have a REGION_NAME column in their data, which is why you would need to update the "Map Region Column" on the Map Attributes page to your chosen column e.g. REGION_ID. In the case of the US State Zipcode maps, the available columns are REGION_ID, CENTROID_X and CENTROID_Y, as shown in this example: http://anychart.com/products/anychart/docs/users-guide/map_reference/United-States-of-America-3-digit-ZIP-Code-Maps-for-All-50-States-Alabama-Flash-Map.html?fromtree. You may not be aware of this, but when stepping through the Create Map wizard, on the 'Query' page, there's a Show/Hide region called "Map Region Information", which displays the AnyChart information associated with your selected map.
    Regards,
    Hilary

  • Apple ID billing information continually adds additional digits to my zip code. This causes my credit card to be invalid, how do I fix this?

    As the title says, when I try to update my billing information the software adds additional digits to my zip code. This is all fine and dandy, it matches to where I live. But my bank only uses the standard five digits and when it adds the additional digits they will not match up correctly despite the first five being matched. This causes an endless and stupidly frustrating cycle that I cannot solve. I tried to find a phone number to call and sort this out but of course that doesn't exist. Any help would be great.

    Hi ...
    Might be something here >  iTunes Store: My credit card's security code or zip code does not match my bank's records
    And you can explain the situation to Apple here > Apple - Support - Mac App Store - Contact Support
    BTW, billing policy is the same for the iTunes and the Mac App Stores.

  • Having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online

    having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online even if it wil be shipped within u.s. only?

    To buy in for delivery in Qatar, you should be starting from the Apple Qatar site:
    http://www.apple.com/qa/
    Do you have an Apple-ID? if you do, then you should not have to enter your Address again, and may be able to sidestep the US Zip Code issue.

Maybe you are looking for

  • HP Photosmart C309a AiO Wireless on and working, can't find network!

    My printer stopped printing a couple of days ago.  It was fine, now it is not.  The blue wireless radio light is on but when I run the network set up, it just runs and can not find my network.  I have run the network diagnostic and it finds my networ

  • Vision Builder 7.0(IMAQ) : Using fxs in subVIs with references to image control

    When using IMAQ fxs (such as 'Write File') in subVIs, if one wanted to use references to an image control, what property or method would be used to feed into the image terminal in the imaq fx on the subVI? Is this possible? What did work: I was able

  • First Excel Doc Opened to be at the bottom of the List on the Taskbar

    When I open multiple excel docs and they combine, I would like them listed in the taskbar with the first doc opened to be at the bottom instead of at the top - how can I do this?? 

  • URGENT export/import guidline needed

    dear gurus can some one advise me 1) if we export from oracle 10gR2, dump files 2) can we import to oracle 10gR dumps files or not? this means the export of higher version, can it be import to lower version of same series, like oracle 10gR series is

  • Procedures and thred

    The question is a little bit of strange, and I didn't know in which section to put it. So here it go. I have Oracle 11g R2 database Enterprise Edition. I wrote an oracle procedure, that does it's job exelent. Now I put dbms_application_info.set_sessi