From 8fc9ba53252afdef2c78d811ef9b3ec65b755caf Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 16 Oct 2020 14:26:54 +0200 Subject: document "followlocation" --- it_url.class | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index c1d7ec5..4e40be1 100644 --- a/it_url.class +++ b/it_url.class @@ -106,6 +106,7 @@ static function _postprocess($data, $p) * @param $p['files'] [fieldname => filename] of files to upload * @param $p['writefunction'] function to be called whenever data is received (for server-sent-events etc.) * @param $p['fetchsleep'] Number of seconds to wait after fetch, fractions ok + * @param $p['followlocation']Follow redirects [true] * @param $p['retries'] Number of retries if download fails, default 1 * @param $p['retrysleep'] Number of seconds to wait before retry (additional to fetchsleep), fractions ok * @param $p['compression'] use compression (uses curl to do that) @@ -332,12 +333,13 @@ function request($p=array()) /** * Get multiple URL in parallel with timeout. Needs to be called statically * @param $p parameter array with the following keys (same as it_url::get) - * @param $p['urls'] array/generator of urls to get - * @param $p['timeout'] timeout per read in seconds, defaults to 5. (TODO: fractions allowed?) - * @param $p['totaltimeout'] timeout for the whole function call (fractions allowed) - * @param $p['headers'] optional array of HTTP headers to send - * @param $p['parallel'] max number of parallel requests - * @param $p['noresults'] do not keep results around + * @param $p['urls'] array/generator of urls to get + * @param $p['timeout'] timeout per read in seconds, defaults to 5. (TODO: fractions allowed?) + * @param $p['totaltimeout'] timeout for the whole function call (fractions allowed) + * @param $p['followlocation'] follow redirects [true] + * @param $p['headers'] optional array of HTTP headers to send + * @param $p['parallel'] max number of parallel requests + * @param $p['noresults'] do not keep results around * @return array of contents (or false for errors like timesou) of resulting page using same * keys as the urls input array, considering redirects, excluding headers */ -- cgit v1.2.3