作者aviatear (在梅邊)
看板Perl
標題[問題] 一直出現 500 internal server error
時間Tue Oct 13 17:00:58 2009
同一個程式 為什麼執行這個網頁(
http://phobius.binf.ku.dk/index.html) 就成功
但是 執行這各網頁(
http://psort.ims.u-tokyo.ac.jp/form2.html) 卻一直出現 500 internal server error??
執行的query(keywords)都是:
>:144448 MLRNNKTIIIKYFLNLINGAFLVLGLLFMGFGAWLLLDRNNFLTAFDENNHFIVPISQILIGMGSSTVLFCLLGYIGIHNEIRWLLIVYAVLITWTFAVQVVLSAFIITKKEEVQQLWHDKIDFVISEYGSKDKPEDITKWTILNALQKTLQCCGQHNYTDWIKNKNKENSGQVPCSCTKSTLRKWFCDEPLNATYLEGCENKISAWYNVNVLTLIGINFGLLTSEVFQVSLTVCFFKNIKNIIHAEM
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
my $ua = new LWP::UserAgent;
$ua->agent("Mozilla/5.0");
my @urls_titles = (), @urls = (),;
my $keywords = "";
print "Enter the keywords, please:\n";
chomp($keywords = <STDIN>);
###################使用POST方式抓search result的urls#################
my $response
= $ua->post('
http://phobius.binf.ku.dk/cgi-bin/predict.pl',
{ stype => '0',
protseq => $keywords,
protfile => '',
"format" => '3',
});
if ($response->is_success) {
$_ = $response->content;
#print $_;
}
else{
print $response->error_as_HTML;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.245.199
1F:推 jlovet:protseq 是不是要先encode? 10/13 17:30
2F:→ jlovet:ㄜ...忽略 10/13 17:33