1 回答
TA贡献1806条经验 获得超8个赞
ted $authPassword;
public function __construct($host = null, $uri = '/', $type='GET',$port = 80, $useCurl = null,$timeout = 10) {
$this -> hasCurl = function_exists('curl_init');
$this -> useCurl = $this -> hasCurl ? ($useCurl !== null ? $useCurl : true) : false;
$this -> type = $type;
$this -> HTTPVersion = '1.1';
$this -> host = $host ? $host : $_SERVER['HTTP_HOST'];
$this -> uri = $uri;
$this -> port = $port;
$this -> timeout = $timeout;
$this -> setHeader('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
$this -> setHeader('Accept-Language', 'en-us,en;q=0.5');
$this -> setHeader('Accept-Encoding', 'deflate');
$this -> setHeader('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7');
$this -> setHeader('User-Agent', 'Mozilla/5.0 Firefox/3.6.
- 1 回答
- 0 关注
- 1099 浏览
添加回答
举报