cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Working with http://www.usps.com

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 27 May 2003 13:38:52 +0200 (CEST)

On Tue, 27 May 2003, Daniel F Reimann wrote:

> I am working with the USPS's page at http://www.usps.com/zip4/.

[snip]

> Selection
> address1
> address2
> city
> state
> zipcode

[snip]

> At the outset, is there something I am blatantly missing?

Yes, I found at least two things that might matter:

1. You've missed several hidden fields that you should consider adding to the
   post, as the site is probably checking for them:

   $ grep hidden welcome.htm
<input type="hidden" name="urbanization" value="">
<input value="" name="firm" type="hidden">
<input value="" name="address" type="hidden">

   The form also sends Submit.x and Submit.y values as the submit button is
   an image, but they might not be important to the server.

2. Spaces in POSTs are usually converted to '+' and not %20, perhaps that
   makes a difference. (Try changing the method="post" to a method="get" and
   use your browser and you'll see what string your browser sends off).

I hope this helps.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-27