src/Generator/Utils.php
public static function getContentFromUrl($url, $basicAuthLogin = null, $basicAuthPassword = null, $proxyHost = null, $proxyPort = null, $proxyLogin = null, $proxyPassword = null, array $contextOptions = [])
    {
        $context = null;
        $options = self::getStreamContextOptions($basicAuthLogin, $basicAuthPassword, $proxyHost, $proxyPort, $proxyLogin, $proxyPassword, $contextOptions);
        if (!empty($options)) {
            $context = stream_context_create($options);
        }
        return file_get_contents($url, false, $context);
    }
public static function getContentFromUrl($url, $basicAuthLogin = null, $basicAuthPassword = null, $proxyHost = null, $proxyPort = null, $proxyLogin = null, $proxyPassword = null, array $contextOptions = [])
    {
        $context = null;
        $options = self::getStreamContextOptions($basicAuthLogin, $basicAuthPassword, $proxyHost, $proxyPort, $proxyLogin, $proxyPassword, $contextOptions);
        if (!empty($options)) {
            $context = stream_context_create($options);
        }
        return file_get_contents($url, false, $context);
    }
public static function getContentFromUrl ( $ url , $ basicAuthLogin = null , $ basicAuthPassword = null , $ proxyHost = null , $ proxyPort = null , $ proxyLogin = null , $ proxyPassword = null , array $ contextOptions = [ ] ) { $ context = null ; $ options = self :: getStreamContextOptions ( $ basicAuthLogin , $ basicAuthPassword , $ proxyHost , $ proxyPort , $ proxyLogin , $ proxyPassword , $ contextOptions ) ; if ( ! empty ( $ options ) ) { $ context = stream_context_create ( $ options ) ; } return file_get_contents ( $ url , false , $ context ) ; }
Get content from url using a proxy or not
@param string $url
@param string $basicAuthLogin
@param string $basicAuthPassword
@param string $proxyHost
@param string $proxyPort
@param string $proxyLogin
@param string $proxyPassword
@param array $contextOptions
@return string
Get content from url using a proxy or not