- file_get_contents: documentation ( source)
- stream_context_create: documentation ( source)
- http_build_query: documentation ( source)
<?php
$keyword="world";
$data = array('CompanyID'=>'88','TopicID'=>'60567'); //定义参数
$data = @http_build_query($data); //把参数转换成URL数据
$aContext = array('http' => array('method' => 'GET',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $data ));
$cxContext = stream_context_create($aContext);
$sUrl = 'http://www.happay.com/Page/Transport/blogDetail.aspx?'; //此处必须为完整路径
$d = @file_get_contents($sUrl,false,$cxContext);
print($d);
?>