This object is used to get remote contents It will try to use cURL if enabled, else file_get_contents

package OWR
used_by \OWR\Stream\Parser
used_by \OWR\CLI\Controller
used_by \OWR\OPML\Parser
used_by \OWR\Cron

 Methods

Try to use cURL if enabled to get distant url else uses file_get_contents It will set $headers from the response

get(string $url, array $opts, bool $isXML, bool $noCache, array $headers) : mixed
Static
author Pierre-Alain Mignot
static
access public

Parameters

$url

string

the url to get

$opts

array

$options for cURL, optionals

$isXML

bool

if we must treat the response as xml

$noCache

bool

must-we check the cache ? (cURL only)

$headers

array

&$headers headers from the response

Returns

mixedthe response on succes, else false

Returns the added microtime of all HTTP queries

getTime() : float
Static
access public
author Pierre-Alain Mignot

Returns

float$_httpTime

Parse response header's and return an associative array

_parseHeader(array $headers) : array
Static
author Pierre-Alain Mignot
static
access protected

Parameters

$headers

array

the headers to parse

Returns

arraythe headers

 Properties

 

total requests time

$_httpTime : float
access protected
static