Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: zip-lookup function

From: gjones05:mail:orion at: 26-Feb-2001 11:53

From: Vos, Doug
<snip> > 2. Need the latest version of an "http-post" to improve this > function, by working with a "post" to usps.gov. > (no pun intended) <snip>
Hi, Doug, I wrote a similar script a couple of weeks ago for a site. I decided to stick with Yahoo's info because the formatting was already correct. The USPS has the city in all caps, as per the preferred postal regs. However, getting a 'POST is easier than ever now with the newer REBOL releases. You simply use read/custom. Here is a snippet from my prototype code for the USPS: site: http://www.usps.gov/cgi-bin/zip4/ctystzip2? zip: "06501" page: read/custom site reduce ['POST rejoin [{ctystzip=} to-url zip]] parse page [thru "--<BR>" copy city-state to "acceptable"] my-city-state: parse city-state none It returns a 2 to 3 component block depending on the city name. I post this more as an example of the newer read/custom version of 'POST. Hope that this is what you are looking for. --Scott Jones