HttpUtility Class Reference


Public Member Functions

 get ($url, $getVars=false, $headers=false)
 head ($url, $getVars=false, $headers=false)
 post ($url, $getVars=false, $postVars=false, $headers=false)
 getStatus ()
 getReturnHeaders ()

Data Fields

const TYPE_GET = 1
const TYPE_POST = 2
const TYPE_HEAD = 3

Protected Member Functions

 doRequest ($type, $url, $getVars, $postVars, $headers)
 parseHeaders ($headers)

Detailed Description

Definition at line 22 of file httputility.php.


Member Function Documentation

doRequest ( type,
url,
getVars,
postVars,
headers 
) [protected]

Definition at line 67 of file httputility.php.

References getStatus(), and parseHeaders().

Referenced by get(), head(), and post().

Here is the call graph for this function:

Here is the caller graph for this function:

get ( url,
getVars = false,
headers = false 
)

do a GET request to given url. you dont have to encode get-parameters, just give it as array

Parameters:
string $url base-url to request to eg. http://example.com/foo/bar
array $getVars optional get-parameters to append to url
array $headers optional request-headers to add to request
Returns:
mixed returns html or false if something went wrong (then ask lastError())

Definition at line 38 of file httputility.php.

References doRequest().

Here is the call graph for this function:

getReturnHeaders (  ) 

return all webserver-headers from the last request

Definition at line 174 of file httputility.php.

References is().

Here is the call graph for this function:

getStatus (  ) 

returns the http-status code of the last request. 0 if we could not figure out status-code

Returns:
int

Definition at line 157 of file httputility.php.

Referenced by doRequest().

Here is the caller graph for this function:

head ( url,
getVars = false,
headers = false 
)

do a HEAD request to given url. you dont have to encode get-parameters, just give it as array

Parameters:
string $url base-url to request to eg. http://example.com/foo/bar
array $getVars optional get-parameters to append to url
array $headers optional request-headers to add to request
Returns:
mixed returns html or false if something went wrong (then ask lastError())

Definition at line 50 of file httputility.php.

References doRequest().

Here is the call graph for this function:

parseHeaders ( headers  )  [protected]

Definition at line 178 of file httputility.php.

Referenced by doRequest().

Here is the caller graph for this function:

post ( url,
getVars = false,
postVars = false,
headers = false 
)

do a GET request to given url. you dont have to encode get-parameters, just give it as array

Parameters:
string $url base-url to request to eg. http://example.com/foo/bar
array $getVars optional get-parameters to append to url
array $postVars optional post-parameters to add to request
array $headers optional request-headers to add to request
Returns:
mixed returns html or false if something went wrong (then ask lastError())

Definition at line 63 of file httputility.php.

References doRequest().

Here is the call graph for this function:


Field Documentation

const TYPE_GET = 1

Definition at line 26 of file httputility.php.

const TYPE_HEAD = 3

Definition at line 28 of file httputility.php.

const TYPE_POST = 2

Definition at line 27 of file httputility.php.


The documentation for this class was generated from the following file:

Generated on Mon Apr 27 16:29:07 2009 for kata by  doxygen 1.5.8