To help you answer my question, here's the HTML source of the web-page I want to automate - changed to protect the innocent. I put the comments in front of the lines for safety and paranoia.$agent = LWP::UserAgent->new(); #initialize agent my $req = POST 'http://www.database.arg', [ ]#HELP! what do I put # inside those # brackets! $content = $agent-request($req)->as_string; #now I want to retrieve the web page the #POST sends me to - and download it to #save it as a file to peruse at my leisure. #I don't know how to do this either!
Hope this helps. If you have any questions feel free to e-mail me at hhalpin@email.unc.edu. I'm really confused and will probably eventually go mad if this doesn't automate - so your help will be vastly appreciated! I also had a helluva time posting it - the only way I could get it to work was to take a '<' away from in front of TEXTAREA and the two INPUTs.#<HTML> # <HEAD><TITLE>Database</TITLE></HEAD> # # <HR> # <FORM METHOD="POST" ACTION="http:/cgi-bin/database-#result.html +"> # <P> #<TABLE NOBORDER> #<TR><TD ALIGN=LEFT>Select a subject: # <TD ALIGN=LEFT COLSPAN=2><SELECT #NAME=subjectspace> #<OPTION> option 1 #<OPTION> option 2 #<OPTION> option 3 #<OPTION SELECTED> option 4 default #<OPTION> option 5 #</SELECT> # <BR><TR><TD> #<TR><TD ALIGN=LEFT>Number of documents:<BR> # <TD ALIGN=LEFT><INPUT TYPE=TEXT SIZE=5 #NAME=SubjectDocs +> #</TABLE> # <P> # Texts to search for (separate different sentences #with a punct +uation):<BR> # TEXTAREA NAME="txt1" WRAP="SOFT" ROWS=12 COLS=50> # /TEXTAREA> # <P> # INPUT TYPE="submit" VALUE="Submit Search"> # INPUT TYPE="reset" VALUE=" Reset to Defaults "> #<BR> # </FORM> # <P> # </BODY> # </HTML>
Thanks, Harry
In reply to Web Automation and POST Confusing - need help by hhalpin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |