Your code is bad. You need to quote strings (hash values). Additionally S1 parameter looks a bit strange with the new line embedded - are you sure?

Here is the curl equivalent of a successful run I did earlier (I broke the lines for readability). You can see that by opening developer tools on Firefox. I have done a successful submission using this from a Linux terminal:

curl 'http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi' -H 'User-Agen +t: XXX' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,imag +e/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: http://www.csbio.sjtu.edu.cn' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: + 1' --data-raw 'mode=string&S1=NTLRVPDILALVIFAVVFLVGVLGNALVVWVTAFEAKRTINAI WFLNLAVADFLACLALPALFTSIVQHHHWPFGGAACSILPSLILLNMYASILLLATISADRFLLVFKPAW CQRFRGAGLAWILCAVAWGLALLLTIPSALYRVVREEYFPPKVLCGVDHDKRRERAVAIVRLVLGFLWPL LTLTICYTFILLRTWSARETRSTKTLKVVVAVVASFFIFWLPYQVTGIMMSFLEPSSPTFLLLKLDSLCV +S FAYINCCINPIIYVVAGQGFQKSLPELLREVLTEESVVR&R5=on&S2=&R4=TOPpre&TOPpre=on &R2=SignalYES&R3=Human&email=abc%40xyz.com&B1=Submit'

You can infere a couple of things from the above: 1) the correct POST params from --data-raw. 2) No cookies are required. So either continue with Mech but use the correct url and POST params or use LWP::UserAgent with a browser-like user-agent string

sarcasm on: if the cgi script you are accessing is also programmed by biologists all bets are on (off, whatever).

bw, bliako


In reply to Re^8: Correct link to put in my WWW:Mechanize by bliako
in thread Correct link to put in my WWW:Mechanize by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.