Posted in PHP onFebruary 13, 2015
废话不多说,上代码:
$data = array( 'name' => 'Joe', 'website' => '3water.com' ); $data = http_build_query($data); $data = json_encode($data); $json = file_get_contents($url, 0, stream_context_create(array( 'http' => array( 'timeout' => 30, 'method' => 'POST', 'content' => $data ) )));
PHP中使用file_get_contents post数据代码例子
- Author -
junjie声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@