| [ Index ] |
|
Code source de Joomla 1.0.13 |
[Code source] [Imprimer] [Statistiques]
PHP HTTP Tools is a library for working with the http protocol php_http_client_generic represents a basic http client
| Author: | John Heinstein <johnkarl@nbnet.nb.ca> |
| Copyright: | (C) 2004 John Heinstein. All rights reserved |
| License: | http://www.gnu.org/copyleft/lesser.html LGPL License |
| Version: | 0.3 |
| Poids: | 761 lignes (20 kb) |
| Inclus ou requis: | 11 fois |
| Référencé: | 0 fois |
| Nécessite: | 1 fichier includes/domit/php_http_exceptions.php |
php_http_request:: (7 méthodes):
getHeaders()
setHeader()
setHeaders()
setRequestMethod()
setRequestPath()
setProtocolVersion()
setAuthorization()
php_http_client_generic:: (19 méthodes):
php_http_client_generic()
generateResponseHeadersAsObject()
fireEvent()
setHTTPEvent()
getHTTPEvent()
defaultHTTPEventHandler()
printHTML()
connect()
disconnect()
isConnected()
get()
get_custom()
post()
post_custom()
head()
head_custom()
send()
normalizeResponseIfChunked()
decodeChunkedData()
php_http_connection:: (6 méthodes):
php_http_connection()
formatHost()
formatPath()
connect()
isOpen()
disconnect()
php_http_headers:: (8 méthodes):
php_http_headers()
getHeader()
setHeader()
headerExists()
removeHeader()
getHeaders()
getHeaderList()
toString()
php_http_response:: (5 méthodes):
getResponse()
getStatusLine()
getStatusCode()
getHeaders()
setUnformattedHeader()
Classe: php_http_request - X-Ref
An HTTP Request class| getHeaders() X-Ref |
| Returns the headers object return: object The headers object |
| setHeader($name, $value, $allowMultipleHeaders = false) X-Ref |
| Sets the header to the specified value param: string The header name param: string The header value param: boolean True if multiple headers with the same name are allowed |
| setHeaders() X-Ref |
| Default method for setting headers; meant to be overridden in subclasses |
| setRequestMethod($method) X-Ref |
| Sets the request method, e.g., GET param: string The name of the request method return: boolean True if the version number is valid |
| setRequestPath($path) X-Ref |
| Sets the request path, e.g., http://www.engageinteractive.com/domit/test.xml param: string The request path |
| setProtocolVersion($version) X-Ref |
| Sets the version number of the protocol param: string The version number return: boolean True if the version number is valid |
| setAuthorization($user, $password) X-Ref |
| Specifies a user name and password for basic authentication param: string The user name param: string The password |
Classe: php_http_client_generic - X-Ref
| php_http_client_generic($host = '', $path = '/', $port = 80, $timeout = 0) X-Ref |
| HTTP Client constructor param: string The client connection host name, with or without its protocol prefix param: string The client connection path, not including the host name param: int The port to establish the client connection on param: int The timeout value for the client connection |
| generateResponseHeadersAsObject($responseHeadersAsObject) X-Ref |
| Specifies that the response headers array should be generated param: boolean True if the response headers array should be built |
| fireEvent($target, $data) X-Ref |
| Fires an http event that has been registered param: string The name of the event, e.g., onRead param: string The data to be passed to the event |
| setHTTPEvent($option, $truthVal, $customHandler = null) X-Ref |
| Sets which http events are to be fired param: string The http event option to be set param: string True if the event is to be fired param: object A reference to a custom handler for the http event data |
| getHTTPEvent($option) X-Ref |
| Evaluates whether the specified http event option is active param: string The http event option to evaluate return: boolean True if the specified option is active |
| defaultHTTPEventHandler($data) X-Ref |
| The default http event handler; fired if no custom handler has been registered param: string The event data |
| printHTML($html) X-Ref |
| Prints the data to the browser as preformatted, htmlentified output param: string The data to be printed |
| connect() X-Ref |
| Establishes a client connection |
| disconnect() X-Ref |
| Disconnects the current client connection if one exists |
| isConnected() X-Ref |
| Evaluated whether the current client is connected return: boolean True if a connection exists |
| get($url) X-Ref |
| Performs an HTTP GET param: string The target url return: object An HTTP response object |
| get_custom($url) X-Ref |
| Handler for customizing the HTTP GET call param: string The target url |
| post($data) X-Ref |
| Performs an HTTP POST param: string The posted data return: object An HTTP response object |
| post_custom($data) X-Ref |
| Handler for customizing the HTTP POST call param: string The post data |
| head($url) X-Ref |
| Performs an HTTP HEAD param: string The target url return: object An HTTP response object |
| head_custom($url) X-Ref |
| Handler for customizing the HTTP HEAD call param: string The target url |
| send($message) X-Ref |
| Sends data through the client connection param: string The message to be sent return: string The http response |
| normalizeResponseIfChunked() X-Ref |
| Determines if response data is transfer encoding chunked, then decodes |
| decodeChunkedData($data) X-Ref |
| Decodes data if transfer encoding chunked param: string The encoded data return: string The decoded data |
Classe: php_http_connection - X-Ref
An HTTP Connection class| php_http_connection($host = '', $path = '/', $port = 80, $timeout = 0) X-Ref |
| HTTP Connection constructor param: string The connection host name, with or without its protocol prefix param: string The connection path, not including the host name param: int The port to establish the client connection on param: int The timeout value for the client connection |
| formatHost($hostString) X-Ref |
| Formats a host string by stripping off the http:// prefix param: string The host name return: string The formatted host name |
| formatPath($pathString) X-Ref |
| Formats a path string param: string The path return: string The formatted path |
| connect() X-Ref |
| Establishes a socket connection return: boolean True if the connection was successful |
| isOpen() X-Ref |
| Determines whether the connection is still open return: boolean True if the connection is still open |
| disconnect() X-Ref |
| Disconnects the current connection return: boolean True if the connection has been disconnected |
Classe: php_http_headers - X-Ref
An HTTP Headers class| php_http_headers() X-Ref |
| HTTP Headers constructor |
| getHeader($name) X-Ref |
| Returns the specified header value param: string The header name return: mixed The header value, or an array of header values |
| setHeader($name, $value, $allowMultipleHeaders = false) X-Ref |
| Sets the named header to the specified value param: string The header name param: string The header value param: boolean True if multiple headers with the same name are allowed |
| headerExists($name) X-Ref |
| Determines whether the specified header exists param: string The header name return: boolean True if the specified header exists |
| removeHeader($name) X-Ref |
| Removes the specified header param: string The header name return: boolean True if the specified header has been removed |
| getHeaders() X-Ref |
| Returns a reference to the headers array return: array The headers array |
| getHeaderList() X-Ref |
| Returns a list of existing headers names return: array A list of existing header names |
| toString() X-Ref |
| Returns a string representation of the headers array return: string A string representation of the headers array |
Classe: php_http_response - X-Ref
An HTTP Response class| getResponse() X-Ref |
| Returns a reference to the headers array return: array The headers array |
| getStatusLine() X-Ref |
| Returns the response status line return: string The response status line |
| getStatusCode() X-Ref |
| Returns the response status code return: int The response status code |
| getHeaders() X-Ref |
| Returns a reference to the headers array return: array The headers array |
| setUnformattedHeader($headerString) X-Ref |
| Converts a header string into a key value pair and sets header |
| Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
|