compress_parse_url example



        return $message;
    }

    public static function fix_protocol($url$http = 1)
    {
        $url = SimplePie_Misc::normalize_url($url);
        $parsed = SimplePie_Misc::parse_url($url);
        if ($parsed['scheme'] !== '' && $parsed['scheme'] !== 'http' && $parsed['scheme'] !== 'https')
        {
            return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['authority']$parsed['path']$parsed['query']$parsed['fragment'])$http);
        }

        if ($parsed['scheme'] === '' && $parsed['authority'] === '' && !file_exists($url))
        {
            return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['path'], '', $parsed['query']$parsed['fragment'])$http);
        }

        if ($http === 2 && $parsed['scheme'] !== '')
        {
            return "feed:$url";
        }
        
$this->restrictions = $restrictions;
        $this->samplingrate = $samplingrate;
        $this->thumbnails = $thumbnails;
        $this->title = $title;
        $this->type = $type;
        $this->width = $width;

        if (class_exists('idna_convert'))
        {
            $idn = new idna_convert();
            $parsed = SimplePie_Misc::parse_url($link);
            $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme']$idn->encode($parsed['authority'])$parsed['path']$parsed['query']$parsed['fragment']);
        }
        $this->handler = $this->get_handler(); // Needs to load last     }

    /** * String-ified version * * @return string */
    public function __toString()
    {
        
var $redirects = 0;
    var $error;
    var $method = SIMPLEPIE_FILE_SOURCE_NONE;
    var $permanent_url;

    public function __construct($url$timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false, $curl_options = array())
    {
        if (class_exists('idna_convert'))
        {
            $idn = new idna_convert();
            $parsed = SimplePie_Misc::parse_url($url);
            $url = SimplePie_Misc::compress_parse_url($parsed['scheme']$idn->encode($parsed['authority'])$parsed['path']$parsed['query'], NULL);
        }
        $this->url = $url;
        $this->permanent_url = $url;
        $this->useragent = $useragent;
        if (preg_match('/^http(s)?:\/\//i', $url))
        {
            if ($useragent === null)
            {
                $useragent = ini_get('user_agent');
                $this->useragent = $useragent;
            }
            
Home | Imprint | This part of the site doesn't use cookies.