elFinder::get_remote_contents PHP Method

get_remote_contents() protected method

Get remote contents
Author: Naoki Sawada
protected get_remote_contents ( string &$url, integer $timeout = 30, integer $redirect_max = 5, string $ua = 'Mozilla/5.0', resource $fp = null ) : string
$url string target url
$timeout integer timeout (sec)
$redirect_max integer redirect max count
$ua string
$fp resource
return string or bool(false)
    protected function get_remote_contents(&$url, $timeout = 30, $redirect_max = 5, $ua = 'Mozilla/5.0', $fp = null)
    {
        $method = function_exists('curl_exec') && !ini_get('safe_mode') && !ini_get('open_basedir') ? 'curl_get_contents' : 'fsock_get_contents';
        return $this->{$method}($url, $timeout, $redirect_max, $ua, $fp);
    }