Class PHPCrawlerUserSendDataCache

Description

Cache for storing user-data to send with requests, like cookies, post-data and basic-authentications.

Located in /libs/PHPCrawler/PHPCrawlerUserSendDataCache.class.php (line 9)


	
			
Variable Summary
Method Summary
bool addBasicAuthentication (string $url_regex, string $username, string $password)
void addPostData (string $url_regex, array $post_data_array)
array getBasicAuthenticationForUrl (string $url)
array getPostDataForUrl (string $url)
Variables
array $basic_authentications = array() (line 16)

Array containing basic-authentications to send.

  • access: protected
array $post_data = array() (line 23)

Array containing post-data to send.

  • access: protected
Methods
addBasicAuthentication (line 89)

Adds a basic-authentication (username and password) to the list of authentications that will be send with requests.

  • access: public
bool addBasicAuthentication (string $url_regex, string $username, string $password)
  • string $url_regex: Regular expression defining the URL(s) the authentication should be send to.
  • string $username: The username
  • string $password: The password
addPostData (line 32)

Adds post-data together with an URL-regex to the list of post-data to send with requests.

  • access: public
void addPostData (string $url_regex, array $post_data_array)
  • string $url_regex: Regular expression defining the URL(s) the post-data should be send to.
  • array $post_data_array: Post-data-array, the keys are the post-data-keys, the values the post-values. (like array("key1" => "value1", "key2" => "value2")
getBasicAuthenticationForUrl (line 115)

Returns the basic-authentication (username and password) that should be send to the given URL.

  • return: Array containing the keys "username" and "password". Returns NULL if no authentication was found in cache for the given URL.
  • access: public
array getBasicAuthenticationForUrl (string $url)
  • string $url: The URL.
getPostDataForUrl (line 63)

Returns the post-data (key and value) that should be send to the given URL.

  • return: Array containing the post_keys as keys and the values as values. (like array("key1" => "value1", "key2" => "value2")
  • access: public
array getPostDataForUrl (string $url)
  • string $url: The URL.

Documentation generated on Sun, 20 Jan 2013 21:18:50 +0200 by phpDocumentor 1.4.4