Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : HTTP : Request Options

Request Options

options usable with the HttpRequest class and request functions ()

Overview

Options related to time outs

timeout (integer)
seconds the whole request may take to complete
connecttimeout (integer)
seconds the connect, including name resolving, may take
dns_cache_timeout (integer)
seconds after an dns cache entry times out

Options related to urls

url (string)
the request url
port (integer)
use another port as specified in the url
redirect (integer)
whether and how many redirects to follow; defaults to 0
unrestrictedauth (bool)
whether to continue sending credentials on redirects to a different host
referer (string)
the refererring url to send

Options related to cookies

encodecookies (bool)
whether custom cookies should be urlencode()d prior sending
cookies (array)
list of cookies as associative array like array("cookie" => "value")
cookiestore (string)
path to a file where cookies are/will be stored
cookiesession (bool)
don't load session cookies from cookiestore if TRUE

Options related to headers

useragent (string)
the user agent to send; defaults to PECL::HTTP/x.y.z (PHP/x.y.z); omitted if explicitly set to an empty string
lastmodified (int)
timestamp for If-(Un)Modified-Since header
etag (string)
quoted etag for If-(None-)Match header
headers (array)
list of custom headers as associative array like array("header" => "value")

Options related to authentication

httpauth (string)
http credentials in "user:pass" format
httpauthtype (int)
HTTP authentication type constant
(array)

Options related to proxies

proxyhost (string)
proxy host in "host[:port]" format
proxyport (int)
use another proxy port as specified in proxyhost
proxytype (int)
HTTP proxy type constant
proxyauth (string)
proxy credentials in "user:pass" format
proxyauthtype (int)
HTTP authentication type constant

Options related to the transfer

compress (bool)
whether to request and accept a gzip/deflate content encoded response
resume (int)
start the download at the specified byte offset if server support is given (indicated by a 206 response code)
range (array)
array of arrays, each containing two integers, specifying the ranges to download if server support is given (indicated by a 206 response code); only recognized if the resume option is empty

Options imposing limits

maxfilesize (integer)
maximum file size that should be downloaded; has no effect, if the size of the requested entity is unknown (eg. dynamic pages with chunked transfer encoding etc.)
low_speed_limit (int)
the lowest transfer speed a successful request may have
low_speed_time (int)
the time in which low_speed_limit must be transferred for a successful request
max_send_speed (int)
maximum send speed in bytes per second
max_recv_speed (int)
maximum receive speed in bytes per second

Callback options

onprogress (callback)
progress callback

Network options

interface (string)
outgoing network interface (ifname, ip or hostname)
portrange (array)
2 integers specifying outgoing portrange to try

SSL options

ssl (array)
Note:

SSL options are set through an array with the single "ssl" request option name.

cert (string)
path to certificate
certtype (string)
type of certificate
certpasswd (string)
password for certificate
key (string)
path to key
keytype (string)
type of key
keypasswd (string)
pasword for key
engine (string)
ssl engine to use
version (int)
ssl version to use
verifypeer (bool)
whether to verify the peer
verifyhost (bool)
whether to verify the host
cipher_list (string)
list of allowed ciphers
cainfo (string)
capath (string)
random_file (string)
egdsocket (string)

Related Examples ( Source code ) » http.request.options


Change Language


Follow Navioo On Twitter
Installation
Configuration
Resources
Constants
Request Options
HttpMessage
HttpMessage::__construct
HttpMessage::factory
HttpMessage::fromEnv
HttpMessage::fromString
HttpMessage::toString
HttpMessage::toMessageTypeObject
HttpMessage::guessContentType
HttpMessage::detach
HttpMessage::prepend
HttpMessage::reverse
HttpMessage::send
HttpMessage::getParentMessage
HttpMessage::getType
HttpMessage::setType
HttpMessage::getHttpVersion
HttpMessage::setHttpVersion
HttpMessage::getHeaders
HttpMessage::getHeader
HttpMessage::addHeaders
HttpMessage::setHeaders
HttpMessage::getBody
HttpMessage::setBody
HttpMessage::getRequestMethod
HttpMessage::setRequestMethod
HttpMessage::getRequestUrl
HttpMessage::setRequestUrl
HttpMessage::getResponseCode
HttpMessage::setResponseCode
HttpMessage::getResponseStatus
HttpMessage::setResponseStatus
HttpQueryString
HttpQueryString::__construct
HttpQueryString::singleton
HttpQueryString::get
HttpQueryString::mod
HttpQueryString::set
HttpQueryString::toArray
HttpQueryString::toString
HttpQueryString::xlate
HttpDeflateStream
HttpDeflateStream::factory
HttpDeflateStream::__construct
HttpDeflateStream::update
HttpDeflateStream::flush
HttpDeflateStream::finish
HttpInflateStream
HttpInflateStream::factory
HttpInflateStream::__construct
HttpInflateStream::update
HttpInflateStream::flush
HttpInflateStream::finish
HttpRequest
HttpRequest::addCookies
HttpRequest::addHeaders
HttpRequest::addPostFields
HttpRequest::addPostFile
HttpRequest::addPutData
HttpRequest::addQueryData
HttpRequest::addRawPostData
HttpRequest::addSslOptions
HttpRequest::clearHistory
HttpRequest::__construct
HttpRequest::enableCookies
HttpRequest::getContentType
HttpRequest::getCookies
HttpRequest::getHeaders
HttpRequest::getHistory
HttpRequest::getMethod
HttpRequest::getOptions
HttpRequest::getPostFields
HttpRequest::getPostFiles
HttpRequest::getPutData
HttpRequest::getPutFile
HttpRequest::getQueryData
HttpRequest::getRawPostData
HttpRequest::getRawRequestMessage
HttpRequest::getRawResponseMessage
HttpRequest::getRequestMessage
HttpRequest::getResponseBody
HttpRequest::getResponseCode
HttpRequest::getResponseCookies
HttpRequest::getResponseData
HttpRequest::getResponseHeader
HttpRequest::getResponseInfo
HttpRequest::getResponseMessage
HttpRequest::getResponseStatus
HttpRequest::getSslOptions
HttpRequest::getUrl
HttpRequest::resetCookies
HttpRequest::send
HttpRequest::setContentType
HttpRequest::setCookies
HttpRequest::setHeaders
HttpRequest::setMethod
HttpRequest::setOptions
HttpRequest::setPostFields
HttpRequest::setPostFiles
HttpRequest::setPutData
HttpRequest::setPutFile
HttpRequest::setQueryData
HttpRequest::setRawPostData
HttpRequest::setSslOptions
HttpRequest::setUrl
HttpRequestPool
HttpRequestPool::attach
HttpRequestPool::__construct
HttpRequestPool::__destruct
HttpRequestPool::detach
HttpRequestPool::getAttachedRequests
HttpRequestPool::getFinishedRequests
HttpRequestPool::reset
HttpRequestPool::send
HttpRequestPool::socketPerform
HttpRequestPool::socketSelect
HttpResponse
HttpResponse::capture
HttpResponse::getBufferSize
HttpResponse::getCacheControl
HttpResponse::getCache
HttpResponse::getContentDisposition
HttpResponse::getContentType
HttpResponse::getData
HttpResponse::getETag
HttpResponse::getFile
HttpResponse::getGzip
HttpResponse::getHeader
HttpResponse::getLastModified
HttpResponse::getStream
HttpResponse::getThrottleDelay
HttpResponse::getRequestBody
HttpResponse::getRequestBodyStream
HttpResponse::getRequestHeaders
HttpResponse::guessContentType
HttpResponse::redirect
HttpResponse::send
HttpResponse::setBufferSize
HttpResponse::setCacheControl
HttpResponse::setCache
HttpResponse::setContentDisposition
HttpResponse::setContentType
HttpResponse::setData
HttpResponse::setETag
HttpResponse::setFile
HttpResponse::setGzip
HttpResponse::setHeader
HttpResponse::setLastModified
HttpResponse::setStream
HttpResponse::setThrottleDelay
HttpResponse::status
http_cache_etag
http_cache_last_modified
http_chunked_decode
http_deflate
http_inflate
http_get_request_body_stream
http_get_request_body
http_get_request_headers
http_date
http_support
http_match_etag
http_match_modified
http_match_request_header
http_build_cookie
http_negotiate_charset
http_negotiate_content_type
http_negotiate_language
ob_deflatehandler
ob_etaghandler
ob_inflatehandler
http_parse_cookie
http_parse_headers
http_parse_message
http_parse_params
http_persistent_handles_count
http_persistent_handles_ident
http_persistent_handles_clean
http_get
http_head
http_post_data
http_post_fields
http_put_data
http_put_file
http_put_stream
http_request_method_exists
http_request_method_name
http_request_method_register
http_request_method_unregister
http_request
http_request_body_encode
http_redirect
http_send_content_disposition
http_send_content_type
http_send_data
http_send_file
http_send_last_modified
http_send_status
http_send_stream
http_throttle
http_build_str
http_build_url
eXTReMe Tracker