不過在某些狀況下, 需要 post data 回 url 時, 可以利用 -post_data 指令來操作, 先列出指令說明:
所以代表著, 利用 -post_data 參數後, 可以將要 post 的 data 帶入, 但是是以 stdin的方式(鍵盤輸入), 也就代表若是要用指令自動化的方式, 得利用輸入重導 (<) 這個方式將檔案導入, 例如:-post_data
properly formatted data for a post form are read in
from stdin and passed to the form. Input is termi-
nated by a line that starts with '---'.
p.txt 內容如下:
代碼: 選擇全部
p1=123 456
&p2=789
代碼: 選擇全部
lynx http://test.com/test.php -post_data < p.txt