Load the data from the URL.

@param string $url
@return string
3828
protected function _getCURL($url) {
		curl_setopt($this->_curl, CURLOPT_URL, $url);
		$content = curl_exec($this->_curl);
		return $content;
	}
427043
public function get($url)
    {

        curl_setopt($this->handle, CURLOPT_POST, 0); // Added to clear past values
        curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, 'GET'); // Added to clear past values

        return $this->execute($url);
    }
447688
protected function _load($url)
    {
        $file = $this->_locate($url);
        $type = pathinfo($file, PATHINFO_EXTENSION);

        if(in_array($type, $this->getFileTypes()))
        {
            if(!$this->_source = file_get_contents($file)) {
                throw new RuntimeException(sprintf('The template "%s" cannot be loaded.', $file));
            }
        }
        else $this->_source = $this->getTemplate()->loadFile($file)->render($this->getData());

        return $this->_source;
    }
631399
public static function parse($url)
    {
        if (!strlen($url)) {
            return null;
        }
        $_urls = array_merge( @parse_url($url), array('params'=>array()) );
        if (isset($_urls['query'])) {
            parse_str($_urls['query'], $_urls['params']);
        }
        return $_urls;  
    }
658743
function ParseUrl($url) {
	    $content = null;

    	$this->Clear();

		$this->url = htmlspecialchars_decode($url);

	    ob_start();
	    if (function_exists('curl_init')) {
		    //curl is the preferred function
		    $crl = curl_init();
		    curl_setopt($crl, CURLOPT_URL, $url);
		    curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
		    curl_setopt($crl, CURLOPT_CONNECTTIMEOUT, 5);
		    curl_setopt($crl, CURLOPT_TIMEOUT, 20);
		    $FileData = curl_exec($crl);
		    $FileInfo = curl_getinfo($crl);
		    curl_close($crl);
		    if ($FileInfo['http_code'] != 200) {
			    throw new \HttpRequestException($FileInfo['http_code'] . ' error for file: ' . $url);
		    }
	    } else {
		    //see if we can use fopen to get file
		    $fopen_check = ini_get('allow_url_fopen');
		    if (!empty($fopen_check)) {
			    $content = file_get_contents($url);
		    } else {
			    throw new \RuntimeException('CURL_DISABLED');
		    }
	    }
	    ob_end_clean();

		if(strlen($content)) {
			$this->modifyContent($content);
			$this->ParseStr($content);
			return true;
		} else {
			return false;
		}
	}
890474
public static function get(string $url)
	{
		$ch = curl_init($url);

		curl_setopt_array(
			$ch,
			[
				CURLOPT_HEADER         => 1,
				CURLOPT_RETURNTRANSFER => 1,
				CURLOPT_SSL_VERIFYPEER => 0,
			]
		);

		$response = curl_exec($ch);

		$responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
		if ($responseCode != 200) {
			throw new HttpException('Could not reach ' . $url, $responseCode);
		}
		$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
		$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);

		curl_close($ch);

		$response = substr($response, $headerSize);

		if (is_null($response)) {
			throw new HttpException('You are exceeding the API request limit.  Please wait longer between requests.', 400);
		}

		if(stripos($contentType, 'application/json') !== false) {
			$response = json_decode($response, true);
		}

		return $response;
	}
1027074
public function getUrl($url)
    {
        if (is_array($url) && ! empty($url['route'])) {
            try {
                $Comet = \CometPHP\Comet::getInstance();
            } catch (\CometPHP\Exceptions\CometNotBooted $e) {
                return null;
            }

            $routeName = $url['route'];
            unset($url['route']);

            $generatedUrl = $Comet['routeGenerator']->generate(
                $routeName,
                $url
            );

            return $generatedUrl;
        }

        return $url;
    }
434941
protected function get($url)
    {
        $request = $this->http->get(
            $url,
            array('User-Agent' => self::USER_AGENT.' v.'.self::VERSION)
        );

        $response = $request->send();

        if (!$response->isSuccessful()) {
            $this->log('fail with '.$response->getStatusCode().' http code in url "'.$url.'" ');

            return;
        }
        $this->logger->log(LogLevel::INFO, 'retrieved url "'.$url.'" ');

        return $response->getBody();
    }
808047
public function request($url)
    {
        $curlOpts = array_replace($this->curlOpts, [CURLOPT_URL => $url]);

        $ch = curl_init();
        foreach ($curlOpts as $opt => $optVal) {
            curl_setopt($ch, $opt, $optVal);
        }

        $resp = curl_exec($ch);
        $info = (object) curl_getinfo($ch);
        curl_close($ch);

        //Check response
        $httpCode = (string) $info->http_code;
        if ($httpCode{0} != '2') {
            $msg = sprintf('HTTP Request Failed (code %s): %s', $info->http_code, $resp);
            throw new HttpException($resp, $msg, $httpCode);
        } elseif (strlen(trim($resp)) == 0) {
            throw new HttpException($resp, 'HTTP Response Empty');
        }

        return $resp;
    }
325720
public function get($url, $data = null)
    {
        if ($this->cache) {
            $result = $this->cache->get($url, array('$data' => $data));
            if (array_key_exists('$data', (array)$result)) {
                return $this->response_data($result, 'get', $url);
            }
        }

        return $this->request('get', $url, $data);
    }
1336893
public function download($url)
    {
        $context = $this->getContext($url);

        return file_get_contents($url, false, $context);
    }
1327965
public function from($url)
	{
		$this->opts['target'] = $this->client->getDatabaseUri();
		$this->opts['source'] = $url;
		return $this->_launch();
	}
1039702
public function initURL($url)
    {
        $contents = file_get_contents($url);

        $lines = explode("\n", $contents);

        return $this->initLines($lines);
    }
45883
public function get($url, $data = []) {
        if (!empty($data)) {
            if (is_array($data)) {
                $data = http_build_query($data);
            }
            if (strpos($url, '?') !== false) {
                $url .= '&' . $data;
            }
            else {
                $url .= '?' . $data;
            }
        }

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);

        $this->_parse_result($ch);

        $content = curl_exec($ch);
        curl_close($ch);

        if ($this->handle_referer) {
            $this->referer = $url;
        }

        return $this->_parse_result($content);
    }
247665
public function performRequest($url)
    {
        $client = $this->getClient();

        return $this->response = $client->get($url);
    }
854864
protected function getValueFromUrl($url)
    {
        $type = substr($url, 0, strpos($url, Ldif::KEY_VALUE_SEPARATOR));

        if (!$this->hasUrlLoader($type)) {
            $this->throwException(sprintf('Cannot find a URL loader for type "%s"', $type));
        }

        try {
            return $this->urlLoaders[$type]->load($url);
        } catch (LdifUrlLoaderException $e) {
            $this->throwException($e->getMessage());
        }
    }
548823
public static function url($url){

		$url = static::_nullValue($url);
		if(!$url){

			return $url;
		}

		$query = parse_url($url, PHP_URL_QUERY);
		if(!$query){

			return $url;
		}

		parse_str($query, $query_parts);

		// First urldecode to be sure that we do not re-encode the query parts.
		$query_parts = array_map('static::_nested_urldecode', $query_parts);

		// http_build_query will take care of the urlencode.
		return strtok($url, '?') . '?' . http_build_query($query_parts);
	}