I added:
$result="$response->content";
print "<br>$result";
at the end of the script.
I doesn't print anything and the form that the post was
to shows nothing updated.
Thanks for helping with this.
Now that the example appears to work, I want to see if I can actually submit a form, so I tried this:
#######################
print "before form was sent";
use strict;
use warnings;
use LWP 5.8.6;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new;
$browser->env_proxy;
my $url =...
I tried this, with the altavista form variables updated from what I had originally.
I'm still getting nothing after it prints
print "before form was sent";
#######################
use strict;
use warnings;
use LWP 5.8.6;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new;
my $word =...
It seems the ISP I was on originally did not have the complete LWP install. I tried it on another ISP and this is what I got:
before form was sent
LWP version 5.803 The user agent is an LWP::UserAgent LWP::UserAgent version 2.033 The response is an HTTP::Response form was sent
Using this...
I tried it with
use LWP 5.53; #<--- thats the perl versiion
before form was sent LWP version 5.53 The user agent is an LWP::UserAgent LWP::UserAgent version 1.80
Then compile gets this:
perl postxe1.cgi
Content-type: text/html
<HTML><HEAD>
<TITLE></TITLE>
</HEAD>
<BODY TEXT=#DD00DD...
This printed in the browser:
before form was sentLWP version 5.53 The user agent is an LWP::UserAgent LWP::UserAgent version 1.80
This is from telnet:
perl postxe1.cgi
Content-type: text/html
<HTML><HEAD>
<TITLE></TITLE>
</HEAD>
<BODY TEXT=#DD00DD LINK=#00FFCC VLINK=#0040ff >before form was...
Sorry if this is too basic, I haven't been using LWP
I got this compile error:
Can't locate object method "post" via package "LWP::UserAgent" (perhaps you forg
ot to load "LWP::UserAgent"?) at postxav.cgi line 41.
I tried changing this:
use strict;
use warnings;
use LWP 5.53...
I print a line at the start of the script to
see that it started ok.
That line prints ok.
Then the LWP above is next.
Nothing happens for the LWP example I gave above.
Can you give me the code for the call to env_proxy
that you added.
I don't know what you mean by using a proxy.
What...
I can't get this example using LWP to work.
Can someone test this and let me know if it actually works
the way it is.
Then I can try to narrow down why it wont work for me.
I understand that the version number for LWP should be the same as my PERL installation.
thanks
###########
use...
I tried this based on the example I found at:
http://www.perl.com/pub/a/2002/08/20/perlandlwp.html?page=2
############
use strict;
use warnings;
#use LWP 5.64;
use LWP::Simple;
my $browser = LWP::UserAgent->new;
my $url = 'http://somewhere.com/wwwboard/index.html';
my...
I looked at the LWP module. It has quite a long list of functions.
Can someone narrow it down to the ones that let me send data to another script as if it was sent from a FORM POST.
Since I have no control over the script it is sending to, I
can't assume I will have something to check to...
print
"Location:http://www.somewhere.com/wwwboard/cgi-bin/wwwboard/wwwboard.pl?nam
e=cindy&subject=new&body=saysomething";
I am trying to simulate what the form sends to the script.
<a name="post"><center><h2>Post A Message!</h2></center></a>
<form method=POST...
I want to write a perl script to fill out a form and submitit.
This is the url the form sends data to.
print
"Location:http://www.somewhere.com/wwwboard/cgi-bin/wwwboard/wwwboard.pl?nam
e=cindy&subject=new&body=saysomething";
Should this work?
If it does, how do I get it to continue in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.