stream_content_create
创建并返回一个文本数据流并应用各种选项,可用于fopen(),filegetcontents()等过程的超时设置、代理服务器、请求方式、头信息设置的特殊过程。
$arr=array(
'method'=>'GET',
'header'=>'Accept-language: en\r\n',
);
$con=stream_context_create($arr);
$content=file_get_contents($url,'r',false,$con);