Ask a Question related to PERL Miscellaneous, Design and Development.
-
Simon Oliver #1
Re: Newbie help with LWP
When you login the server must pass a token back to the browser so that
the browser can identify itself to the server in the next request. This
is normally done using a cookie but might be done using hidden form
fields. I can't tell without seeing the response from the server after
successful login.
Some other points to note:
- many servers are case sensitive - are you sure the file extension
should be uppercase?
my $status = getstore('http://192.168.2.1:88/status.HTM','info');
- there is a hidden form element that presumably tells the server which
page you came from - you should add this to the post:
<INPUT type=hidden value=login name=page>
- I've looked through the source to the form and can't see any box in
which to type the login name!
- try using HTML::Form to parse the web page and use the click() method
to submit it, something like this:
my $response = $ua->get('http://192.168.2.1:88');
# Check for errors
if ($response->is_error) {
die "Error requesting form: ", $response->status_line, "\n";
}
# Parse the form
my ($form) = HTML::Form->parse($response->content, $response->base);
# Set the parameters
$form->value(pws => $passwd);
# Submit the completed form
$response = $ua->request($form->click);
# Check for errors
if ($response->is_error) {
die "Error submitting form: ", $response->status_line, "\n";
}
# $ response now contains the login response
--
Simon Oliver
Simon Oliver Guest
-
A newbie with a newbie question
Good afternoon everyone, My Name is Dusty I am new to this forum and pretty new to Acrobat. I have Acrobat 9 running on an IMAC running 10.5.2 I... -
Help for a Newbie
Hi All, I have 3 files I am using, Index.html, Test.asp, MyNewpage.html. I am try to load MyNewPage.html into Test.asp. Index.html has a link as... -
newbie ill q
Hey everyone, I have to work on some logos for my place of business... I've scanned them in , edited them in Photoshop, and then made a workpath... -
Newbie needs help
I am teaching myself Flash using Flash MX.. I have created a small Flash movie but can't find any direction on how to get rid of the excess page ... -
Please help a newbie!
Hi, I am just starting out using Flash MX. I just want some general knowledge on Flash......I am planning on making a website, but I have no idea...



Reply With Quote

