Re: 用header送出post表單
感謝各位的幫忙,
我成功了...
但是我不知道是怎麼改(抄)出來的...
以下附上程式和標記改過的部份...
$data = "txt=".urlencode($_GET['txt'])."&speakButton=SPEAK&voice= ";
$out="POST /tts/cgi-bin/nph-talk HTTP/1.1\r\n";
$out.="HOST: 192.20.225.55\r\n";
$out.= "Accept: wav\r\n";
$out.= "Connection: close\r\n";
$out.= "Content-type: application/x-www-form-urlencoded\r\n";
$out.= "Content-length: " . strlen($data) . "\r\n";
$out.= "\r\n";
$out.= ($data)."\r\n";
fputs($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.68.92.156
※ 編輯: costbook 來自: 203.68.92.156 (02/12 06:23)
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):
2
7
PHP 近期熱門文章
PTT數位生活區 即時熱門文章
0
18