wget crul POST 数据

1.wget

wget --post-data="user=user1&pass=pass1&submit=Login" http://domain.com/path/page_need_login.php  

2.curl (可直接发送格式化请求例如json)

提交json数据需要加header,否则需'json={"phone":"13521389587","password":"test"}’

curl -H "Content-type: application/json" -X POST -d '{"phone":"13521389587","password":"test"}' http://domain/apis/users.json

普通请求

curl $URL -d "2880[]=105&pid=2880&p=最佳&count=1&receipt=1&poll=投票"

结果

Array

(

    [2880] => Array

        (

            [0] => 105

        )

    [pid] => 2880

    [p] => 最佳

    [count] => 1

    [receipt] => 1

    [poll] => 投票

)

猜你喜欢

转载自qq85609655.iteye.com/blog/2336001