PHP Class Networkcurl

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

Méthodes publiques

Méthode 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

Méthode Description
reinit ( ) 重置

Method Details

__construct() public méthode

public __construct ( )

__get() public méthode

public __get ( $property_name ) : mixed
$property_name
Résultat mixed

__set() public méthode

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

abort() public méthode

取消
public abort ( )

addBinary() public méthode

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

addText() public méthode

public addText ( string $name, string $entity ) : mixed
$name string
$entity string
Résultat mixed

add_postdata() public méthode

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

enableGzip() public méthode

启用Gzip
public enableGzip ( )

getAllResponseHeaders() public méthode

public getAllResponseHeaders ( ) : string
Résultat string

getResponseHeader() public méthode

获取返回头
public getResponseHeader ( $bstrHeader ) : string
$bstrHeader
Résultat string

open() public méthode

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

send() public méthode

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

setMaxRedirs() public méthode

public setMaxRedirs ( integer $n )
$n integer

setRequestHeader() public méthode

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

setTimeOuts() public méthode

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