改造微擎ihttp_request函数增加请求头信息
代码:function qiyecha($appcode, $keyword)
{
load()->func('communication');
$host = "https://businessfuzzy.shumaidata.com";
$path = "/getbusinessfuzzy";
$querys = "keyword=".urlencode($keyword);
// 请求URL
$url = $host . $path . "?" . $querys;
// HTTP_HEADER
$extra = array(
"Authorization" => "APPCODE " . $appcode
);
$response = ihttp_request($url, '', $extra);
return $response['content'];
}
页:
[1]