/* * *
* patible; MSIE 6.; Windows NT 5.1 : SV1; LazyCMS.net::DownLoader)';
var $_url,$_method,$_timeout;
var $ _ scheme, $ _ host, $ _ port, $ _ path, $ _ query, $ _ referer;
var $_header;
var $_response;
/**
* PHP5 모드
*
* @param 과 다음 매개변수
*/
function _ _ construction 과 호환됩니다
if (! Empty($url)) {
$this-> Connect($url,$method,$timeout);
}
return $this;
}
/**
* 객체 초기화
*
* @ paramstring $ URL
* @ paramstring $ mm @ paramint $ timeout
* @ return object
*/
function httplib ($ URL = null, $ methood _ _ construct ($ URL, $ method, $ timeout);
}
/**
* 연결 URL 변경
*
* @ paramstring $ URL
* @ paramstring $ @ paramint $ timeout
* @ return object
*/
function connect ($ URL = null, $ methood _header = null;
$this-> _response = null;
$this-> _url = $url;
$this-> _ method = strtoupper (empty ($ method)?' GET': $method);
$this-> _timeout = empty($timeout)? 3: $timeout;
if (! Empty($url)) {
$this-> _parseURL($url);
}
return $this;
}
/**
* 요청 보내기
*
* @ paramarray $ params
* @ return bool <; $response = null; $QueryStr = null;
if (! Empty($params)) {$this-> _method = 'POST'; }
if (function _ exists ('fsockopen')) {
$ FP = @ fsockopen ($ this-> _host,$this-> _port,$errno,$errstr,$this-> _timeout);
if (! $fp) {return false; }
$_port = ((int)$this-> _ 포트! ==8)?' :' .. $this-> _port: null;
$SendStr = "{$this-> _method} {$this-> _path}{$this-> _query} HTTP/1.\r\n ";
$ sendstr. = "호스트: {$ this-> _host}{$_port}\r\n ";
$SendStr.= "Accept: */*\r\n ";
$ sendstr. = "referer: {$ this-> _referer}\r\n ";
$ sendstr. = "user-agent:" .. $ this-> _SEND_USER_AGENT."\r\n ";
$ sendstr. = "pragma: no-cache \ r \ n";
$ sendstr. = "cache-control: no-cache \ r \ n";
// POST 메소드인 경우 매개변수
if ($this->) 를 분석합니다 _method=='POST') {
// 매개변수가 배열인지 확인하고 질의 문자열
if (is _ array ($ params)) {
를 순환합니다
$http-> Send ();
$body = $http-> Response ();
echo $body;