[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Post data
From: |
Foteos Macrides |
Subject: |
Re: LYNX-DEV Post data |
Date: |
Tue, 22 Apr 1997 10:31:06 -0500 (EST) |
address@hidden (Mark Mestern) wrote:
>Thank you for lynx. It is very useful for making commandline script to download
>info from web pages. However I am finding trouble with pages
>that require you to enter data in a form.
>
>As an example at url http://www.hrm.uct.ac.za/cgi/cgi_sas.exe
>there is a form for entering a number to get a result. I'd like to do this
>in a script. Entering the data by hand and pressing "=" on the
>result page lynx gives the following info:
>
> Linkname: UCT Final Results - Student Administration Systems:
> URL: http://www.hrm.uct.ac.za/cgi/cgi_sas.exe
> Post Data: entrypoint=step2&studentnumber=mstmad323
> Post Content Type: application/x-www-form-urlencoded
> Owner(s): None
> size: 19 lines
> mode: normal
>
>So I thought one could call up this page using
>
>lynx
>http://www.hrm.uct.ac.za/cgi/cgi_sas.exe?entrypoint=step2\&studentnumber=mstmad323
>
>Unfortunately although this method worked with many other forms I've
>tried this one doesn't work.
>
>Can you tell me how to get lynx to go to a page like this from a command
>line address? It be very useful.
By making the POST content a ?searchpart in the URL, you're
treating the request as a GET, and CGI scripts vary in whether they'll
handle POST and GET equivalently, plus you're giving it implied safety
to re-submit, which is OK in that case, but need not be for FORMs with
METHOD=POST.
Investigate Lynx's -post_data switch, and do a search for lynx-dev
and that switch as queries, for previous discussions of how best to use
that switch from the command line or in scripts.
Fote
=========================================================================
Foteos Macrides Worcester Foundation for Biomedical Research
address@hidden 222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;