wget crul POST data

1.wget

 

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

 

2. curl (you can directly send formatted requests such as json)

Submit json data need to add header, otherwise need 'json={"phone":"13521389587","password":"test"}'

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

normal request

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

 

result

Array

(

    [2880] => Array

        (

            [0] => 105

        )

 

    [pid] => 2880

    [p] => best

    [count] => 1

    [receipt] => 1

    [poll] => poll

)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326490026&siteId=291194637