PHP Class Networkcurl

自定义网络连接接口代替curl
Inheritance: implements iNetwork
Mostrar archivo Open project: zblogcn/zblogphp

Public Methods

Method Description
__construct ( )
__get ( $property_name ) : mixed
__set ( $property_name, $value )
abort ( ) 取消
addBinary ( string $name, string $entity, $filename = null, $mime = '' ) : mixed
addText ( string $name, string $entity ) : mixed
add_postdata ( string $bstrItem, mixed $bstrValue ) 添加数据
enableGzip ( ) 启用Gzip
getAllResponseHeaders ( ) : string
getResponseHeader ( $bstrHeader ) : string 获取返回头
open ( $bstrMethod, $bstrUrl, boolean $varAsync = true, string $bstrUser = '', string $bstrPassword = '' ) : boolean 链接远程接口
send ( string $varBody = '' ) 发送数据
setMaxRedirs ( integer $n )
setRequestHeader ( $bstrHeader, $bstrValue, boolean $append = false ) : boolean 设置请求HTTP头
setTimeOuts ( $resolveTimeout, $connectTimeout, $sendTimeout, $receiveTimeout ) 设置超时时间

Private Methods

Method Description
reinit ( ) 重置

Method Details

__construct() public method

public __construct ( )

__get() public method

public __get ( $property_name ) : mixed
$property_name
return mixed

__set() public method

public __set ( $property_name, $value )
$property_name
$value

abort() public method

取消
public abort ( )

addBinary() public method

public addBinary ( string $name, string $entity, $filename = null, $mime = '' ) : mixed
$name string
$entity string
return mixed

addText() public method

public addText ( string $name, string $entity ) : mixed
$name string
$entity string
return mixed

add_postdata() public method

添加数据
public add_postdata ( string $bstrItem, mixed $bstrValue )
$bstrItem string 参数
$bstrValue mixed

enableGzip() public method

启用Gzip
public enableGzip ( )

getAllResponseHeaders() public method

public getAllResponseHeaders ( ) : string
return string

getResponseHeader() public method

获取返回头
public getResponseHeader ( $bstrHeader ) : string
$bstrHeader
return string

open() public method

链接远程接口
public open ( $bstrMethod, $bstrUrl, boolean $varAsync = true, string $bstrUser = '', string $bstrPassword = '' ) : boolean
$bstrMethod
$bstrUrl
$varAsync boolean
$bstrUser string
$bstrPassword string
return boolean

send() public method

发送数据
public send ( string $varBody = '' )
$varBody string

setMaxRedirs() public method

public setMaxRedirs ( integer $n )
$n integer

setRequestHeader() public method

设置请求HTTP头
public setRequestHeader ( $bstrHeader, $bstrValue, boolean $append = false ) : boolean
$bstrHeader
$bstrValue
$append boolean
return boolean

setTimeOuts() public method

设置超时时间
public setTimeOuts ( $resolveTimeout, $connectTimeout, $sendTimeout, $receiveTimeout )
$resolveTimeout
$connectTimeout
$sendTimeout
$receiveTimeout