POST/GET in comandline script

Discussion in 'HTML' started by vjp2.at@at.BioStrategist.dot.dot.com, May 5, 2004.

  1. Guest

    ANyone have any hints how I can get started figuring out how to do this?


    much obliged


    From: [9]Klaus Johannes Rusch ([10])
    Subject: Re: shell script to lynx medline
    Newsgroups:
    [12]comp.infosystems.www.browsers.misc
    Date: 2004-04-20 06:38:50 PST

    wrote:
    > I used to have a BASHRC proc for searching the medical database MEDLINE
    >
    > medline () { SRCH=`echo $* | sed -e 's/ /+/g'`; lynx -accept_all_cookies '[13]http://www.ncbi.nlm.nih.gov/ht

    bin-post/Entrez/query_old?form=4&title=no&term='$SRCH'&submit=Search&field=All+++++++++++++++++++Fields&mode=A
    utomatic&relpubdate=No+Limit&dispmax=100+&Dopt=d';}
    >
    > They now use the following format:
    >
    > [14]http://www.ncbi.nlm.nih.gov/entrez/query.fcgi
    >
    > But I can't get this to work like a BASH proc..


    The new site requires POST requests so you will need to pass parameters
    using the -post_data option.
    , May 5, 2004
    #1
    1. Advertising

  2. vjp2.at wrote:

    > ANyone have any hints how I can get started figuring out how to do this?


    Install the Perl libwww package. It provides /usr/bin/POST (and also GET
    and HEAD).

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, May 5, 2004
    #2
    1. Advertising

  3. William Park Guest

    In <alt.html> wrote:
    >
    > ANyone have any hints how I can get started figuring out how to do this?


    > > I used to have a BASHRC proc for searching the medical database MEDLINE
    > >
    > > medline () { SRCH=`echo $* | sed -e 's/ /+/g'`; lynx
    > > -accept_all_cookies
    > > '[13]http://www.ncbi.nlm.nih.gov/htbin-post/Entrez/query_old?form=4&title=no&term='$SRCH'&submit=Search&field=All+++++++++++++++++++Fields&mode=Automatic&relpubdate=No+Limit&dispmax=100+&Dopt=d';}
    > >
    > > They now use the following format:
    > >
    > > [14]http://www.ncbi.nlm.nih.gov/entrez/query.fcgi
    > >
    > > But I can't get this to work like a BASH proc..

    >
    > The new site requires POST requests so you will need to pass parameters
    > using the -post_data option.


    lynx -post_data http://... << EOF
    ....
    EOF

    man lynx
    -post_data
    properly formatted data for a post form are read in from
    stdin and passed to the form. Input is terminated by a
    line that starts with '---'.

    --
    William Park, Open Geometry Consulting, <>
    Linux solution/training/migration, Thin-client
    William Park, May 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,516
    BobMonk
    Jul 15, 2003
  2. Shiv
    Replies:
    3
    Views:
    820
    John C. Bollinger
    Oct 13, 2003
  3. arnuld
    Replies:
    6
    Views:
    603
    arnuld
    Sep 5, 2007
  4. Rajat
    Replies:
    3
    Views:
    689
    Jorgen Grahn
    Jan 8, 2010
  5. Kevin Blount

    search engine ASP script - GET vs POST

    Kevin Blount, Apr 8, 2005, in forum: ASP General
    Replies:
    3
    Views:
    251
    Jeff Cochran
    Apr 11, 2005
Loading...

Share This Page