php接收curl发送的post数据
curl发送数据(POST)
1 |
curl -H "Content-Type: application/json" -X POST -d '{"phone":"13011110000","password":"111111"}' http://sunrise.com/apis/Authorizations |
php接受数据
1 2 |
// 从payload中读取post内容。 $request_body = file_get_contents('php://input'); |