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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |