Hi all,
I'm tinkering with some of the libwww modules and trying to get some
information from the USPS web site. Here's a simple script to get a zip+4
address:
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = POST 'http://www.usps.gov/cgi-bin/zip4/zip4inq2',
[ 'Submit' => 'Process',
'Delivery Address' => '46 W 34TH AVE',
'Zip Code' => 99203 ];
print $ua->request($req)->as_string;
Every time I run this I get a 500 error, yet when I do the same thing with
lynx from my machine, it works fine.
Is the web site able to discern who is sending requests to keep people
from mass-querying their database? I have tried adding a
$ua->agent('Mozilla/5.0'); line to no avail.
I have also used the cg-eye live service at www.htmlhelp.org to diagnose
the problem, but I still get the same 500 error there (but no error
otherwise).
Any ideas?
Thanks,
Luke
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]