GET方式获取数据,支持多个URL
string, Module_HttpClient_Driver_Fsock::get( string/array $url [, $timeout $timeout = integer 10 ] )
参数列表
参数 类型 描述 默认值 $url
string/array
$url $timeout
$timeout
integer 10
string,
false on failurepublic function get($url, $timeout = 10)
{
if ( is_array($url) )
{
$getone = false;
$urls = $url;
}
else
{
$getone = true;
$urls = array($url);
}
$data = $this->request_urls($urls, $timeout);
$this->clear_set();
if ( $getone )
{
$this->http_data = $this->http_data[$url];
return $data[$url];
}
else
{
return $data;
}
}