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); }