Zend_Http_ClientZend_Http_Client is an implemetation of an HTTP client in PHP. The client
supports basic features like sending different HTTP requests and handling redirections, as well as more advanced features like proxy settings, HTTP authentication and cookie persistance (using a Zend_Http_Cookiejar object)
Located in /library/Zend/Http/Client.php (line 41)
Zend_Http_Client_Abstract | --Zend_Http_Client
static string
encodeFormData
(string $boundary, string $name, mixed $value, [string $filename = null], [array $headers = array()])
void
setFileUpload
(string $filename, string $formname, [string $data = null], [string $ctype = null])
void
setProxy
(string|null $host, [int $port = 8080], [string $user = null], [string $password = null])
array|null
$auth
(line 94)
HTTP Authentication settings
Expected to be an associative array with this structure: $this->auth = array('user' => 'username', 'password' => 'password', 'type' => 'basic') Where 'type' should be one of the supported authentication types (see the AUTH_* constants), for example 'basic' or 'digest'.
If null, no authentication will be used.
Zend_Http_Cookiejar
$Cookiejar
= null (line 111)
The client's cookie jar
boolean
$doStrictRedirects
= false (line 73)
Whether to strictly follow RFC 2616 when redirecting
If true, 301 & 302 responses will be treated as written in the RFC - that is the same request method will be used in the new request. If false (default), a GET request is always used in the next request.
array
$files
= array() (line 104)
File upload arrays (used in POST requests)
An associative array, where each element is of the format: 'name' => array('filename.txt', 'text/plain', 'This is the actual file contents')
int
$maxRedirects
= 5 (line 55)
Maximum number of redirections to follow, 0 for none.
array
$proxy
= array('host' => null, 'port' => null, 'user' => null, 'password' => null) (line 80)
HTTP proxy settings
int
$redirectCounter
= 0 (line 62)
Redirection counter
Inherited from Zend_Http_Client_Abstract
Zend_Http_Client_Abstract::$enctype
Zend_Http_Client_Abstract::$headers
Zend_Http_Client_Abstract::$http_version
Zend_Http_Client_Abstract::$last_request
Zend_Http_Client_Abstract::$method
Zend_Http_Client_Abstract::$paramsGet
Zend_Http_Client_Abstract::$paramsPost
Zend_Http_Client_Abstract::$raw_post_data
Zend_Http_Client_Abstract::$timeout
Zend_Http_Client_Abstract::$uri
Zend_Http_Client_Abstract::$user_agent
static encodeAuthHeader (line 637)
Create a HTTP authentication "Authorization:" header according to the specified user, password and authentication method.
static encodeFormData (line 610)
Encode date to a multipart/form-data part suitable for a POST request.
getCookiejar (line 224)
Return the current cookie jar or null if none.
getLastRedirectionsCount (line 139)
Get the number of redirections done on the last request
request (line 309)
Send the HTTP request and return an HTTP response object
resetParameters (line 262)
Clear all GET and POST parameters
Should be used to reset the request parameters if the client is used for several concurrent requests.
setAuth (line 178)
Set HTTP authentication parameters
$type should be one of the supported types - see the self::AUTH_* constants.
To enable authentication:
setCookie (line 236)
Add a cookie to the request. If the client has no Cookie Jar, the cookies will be added directly to the headers array as "Cookie" headers.
setCookiejar (line 206)
Set the HTTP client's cookie jar.
A cookie jar is an object that holds and maintains cookies across HTTP requests and responses.
setFileUpload (line 287)
Set a file to upload (using a POST request)
Can be used in two ways:
setMaxRedirects (line 118)
Set the number of maximum redirections to follow, 0 for none.
setProxy (line 152)
Set a proxy server for the request
setStrictRedirects (line 129)
Set whether to strictly follow RFC 2616 when redirecting or not (See documentation for Zend_Http_Client::doStrictRedirects for details)
_connect (line 522)
Open a connection to the remote server
_getParametersRecursive (line 577)
Helper method that gets a possibly multi-level parameters array (get or post) and flattens it.
The method returns an array of (key, value) pairs (because keys are not necessarily unique. If one of the parameters in as array, it will also add a [] suffix to the key.
_prepare_body (line 454)
Prepare the request body (for POST and PUT requests)
_prepare_headers (line 371)
Prepare the request headers
_read (line 553)
Read response from remote server
_write (line 542)
Send request to the remote server
Inherited From Zend_Http_Client_Abstract
Zend_Http_Client_Abstract::__construct()
Zend_Http_Client_Abstract::delete()
Zend_Http_Client_Abstract::get()
Zend_Http_Client_Abstract::getHeader()
Zend_Http_Client_Abstract::getLastRequest()
Zend_Http_Client_Abstract::getMethod()
Zend_Http_Client_Abstract::getUri()
Zend_Http_Client_Abstract::post()
Zend_Http_Client_Abstract::put()
Zend_Http_Client_Abstract::request()
Zend_Http_Client_Abstract::resetParameters()
Zend_Http_Client_Abstract::setCookie()
Zend_Http_Client_Abstract::setEncType()
Zend_Http_Client_Abstract::setHeader()
Zend_Http_Client_Abstract::setHeaders()
Zend_Http_Client_Abstract::setMethod()
Zend_Http_Client_Abstract::setParameterGet()
Zend_Http_Client_Abstract::setParameterPost()
Zend_Http_Client_Abstract::setRawData()
Zend_Http_Client_Abstract::setTimeout()
Zend_Http_Client_Abstract::setUri()
Zend_Http_Client_Abstract::setUserAgent()
Zend_Http_Client_Abstract::validateHeaders()
Zend_Http_Client_Abstract::_connect()
Zend_Http_Client_Abstract::_prepare_body()
Zend_Http_Client_Abstract::_prepare_headers()
Zend_Http_Client_Abstract::_read()
Zend_Http_Client_Abstract::_setParameter()
Zend_Http_Client_Abstract::_write()
AUTH_BASIC
= 'basic'
(line 47)
Supported HTTP Authentication methods
Inherited from Zend_Http_Client_Abstract
Zend_Http_Client_Abstract::ENC_FORMDATA
Zend_Http_Client_Abstract::ENC_URLENCODED
Zend_Http_Client_Abstract::HTTP_VER_0
Zend_Http_Client_Abstract::HTTP_VER_1
Zend_Http_Client_Abstract::METHOD_CONNECT
Zend_Http_Client_Abstract::METHOD_DELETE
Zend_Http_Client_Abstract::METHOD_GET
Zend_Http_Client_Abstract::METHOD_HEAD
Zend_Http_Client_Abstract::METHOD_OPTIONS
Zend_Http_Client_Abstract::METHOD_POST
Zend_Http_Client_Abstract::METHOD_PUT
Zend_Http_Client_Abstract::METHOD_TRACE
Documentation generated on Tue, 11 Jul 2006 12:24:15 -0500 by phpDocumentor 1.3.0RC6