how can I parse the
resulting page from the usps site?
We tried. Spent about 20 hours trying, actually.
The results don't come completely standard/same every time, so it's worth the 3 seconds to highlight-copy-paste.
Is there a solution for PHP?
Here's what we use 100 times a day on our shipping business. It helps a
LOT.
If you're clever with a little javascript you can take your database
fields, post it into the two TEXT form fields here.
Buying the database from the USPS is so expensive I think the best method
is to interface with their website for free, like this below...
<FORM NAME="Table1FORM"
ACTION="http://www.framed.usps.com/cgi-bin/zip4/zip4inq2" METHOD=POST>
<INPUT id="FormsEditField6" TYPE="hidden" NAME="Firm" VALUE="">
<INPUT id="FormsEditField7" TYPE="hidden" NAME="Urbanization">
<p>Street Address:<br>
<INPUT id="FormsEditField8" TYPE="text" NAME="Delivery Address" VALUE=""
SIZE=30 MAXLENGTH=40 >
<p>
<INPUT id="FormsEditField9" TYPE="hidden" NAME="City" VALUE="">
<INPUT id="FormsComboBox2" TYPE="hidden" NAME="State" VALUE="">
<p>Zip Code:<br>
<INPUT id="FormsEditField11" TYPE="text" NAME="Zip Code" VALUE="" SIZE=10
MAXLENGTH=10 >
<p>
<INPUT TYPE="submit" NAME="Submit" VALUE="Process" id="FormsButton2">