`

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] => 投票

)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics