M
matlaw
I'm trying to Post to a web site using the following code:
But when I do, I get an HTML file from www.sfarmls.com telling me that
I'm using an invalid entry point.
However, I can easily access this site with the following telnet
commands:
Can anyone tell me what I'm doing wrong?
Thanks,
Matt
#!/usr/bin/perl
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = POST 'http://www.sfarmls.com/scripts/mgrqispi.dll',
[ APPNAME => 'Sanfrancisco',
PRGNAME => 'MLSLogin',
ARGUMENTS => ('-ASS','-AA'),
];
print $ua->request($req)->as_string;
But when I do, I get an HTML file from www.sfarmls.com telling me that
I'm using an invalid entry point.
However, I can easily access this site with the following telnet
commands:
POST /scripts/mgrqispi.dll HTTP/1.1
Host: www.sfarmls.com
Content-Length: 56
Content-Type: application/x-www-form-urlencoded
APPNAME=Sanfrancisco&PRGNAME=MLSLogin&ARGUMENTS=-ASS,-AA
Can anyone tell me what I'm doing wrong?
Thanks,
Matt