Php/docs/context.curl
来自菜鸟教程
CURL context options
CURL context options — CURL 上下文选项列表
范例
Example #1 获取一个页面,并以POST发送数据
<?php$postdata = http_build_query( array( 'var1' => 'some content', 'var2' => 'doh' ));$opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ));$context = stream_context_create($opts);$result = file_get_contents('http://example.com/submit.php', false, $context);?>