normalize_url example

if ($log_error)
            {
                @error_log("$note: $message in $file on line $line", 0);
            }
        }

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

        
Home | Imprint | This part of the site doesn't use cookies.