Core/Toolbox/IO/Download.php
private function getCurl(string $url, int $return = 1, int $timeout = 10, string $lang = 'de-DE')
    {
        // Define useragent
        $agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ' . $lang . '; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12';
        
        // Url encode
        $url = urlencode($url);
        
        // Language of request
        $lang = array(
            'Accept-Language: ' . $lang
        );
        
        $curl = curl_init();
        
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
        curl_setopt($curl, CURLOPT_HTTPHEADER, $lang);
        curl_setopt($curl, CURLOPT_USERAGENT, $agent);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, $return);
        curl_setopt($curl, CURLOPT_URL, $url);
        
        $result = curl_exec($curl);
        
        curl_close($curl);
        
        return $result;
    }
private function getCurl(string $url, int $return = 1, int $timeout = 10, string $lang = 'de-DE')
    {
        // Define useragent
        $agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ' . $lang . '; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12';
        
        // Url encode
        $url = urlencode($url);
        
        // Language of request
        $lang = array(
            'Accept-Language: ' . $lang
        );
        
        $curl = curl_init();
        
        curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
        curl_setopt($curl, CURLOPT_HTTPHEADER, $lang);
        curl_setopt($curl, CURLOPT_USERAGENT, $agent);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, $return);
        curl_setopt($curl, CURLOPT_URL, $url);
        
        $result = curl_exec($curl);
        
        curl_close($curl);
        
        return $result;
    }
Fetches an url and returns the returned data

@param string $url
Url to load
@param number $return
Flag to expect return value
@param number $timeout
Max timeout
@param string $lang
Language of useragent to send

@return mixed