H
hash
Hello All,
I am trying to use the post method in perl to fill a form. The form
is actually for sending an instant message to a cell phone, i
would like to do this automatically without going to the site.
I read the source file for the web page and extracted the text field
names, area=area code, num1=first 3 digit, num2=4 digit, text=the text
to send, but my phone doesn't get the message. Has anyone done this
before and can all forms that are fillable in a web page can be filled
using post method?
thanks in advance for your help, the script i am using is given below.
web site
---------
http://www.rogers.com/english/wireless/sendpcs.html
script
-------
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST =>
'http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new');
$req->content_type('application/x-www-form-urlencoded');
$req->content('area=xxx&num1=xxx&num2=xxxx&text=xx');
my $res = $ua->request($req);
print $res->as_string;
exit;
I am trying to use the post method in perl to fill a form. The form
is actually for sending an instant message to a cell phone, i
would like to do this automatically without going to the site.
I read the source file for the web page and extracted the text field
names, area=area code, num1=first 3 digit, num2=4 digit, text=the text
to send, but my phone doesn't get the message. Has anyone done this
before and can all forms that are fillable in a web page can be filled
using post method?
thanks in advance for your help, the script i am using is given below.
web site
---------
http://www.rogers.com/english/wireless/sendpcs.html
script
-------
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST =>
'http://216.129.53.44:8080/cgi-bin/send_sm_rogers.new');
$req->content_type('application/x-www-form-urlencoded');
$req->content('area=xxx&num1=xxx&num2=xxxx&text=xx');
my $res = $ua->request($req);
print $res->as_string;
exit;