idna_convert example

var $body;
    var $status_code;
    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->player = $player;
        $this->ratings = $ratings;
        $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 */
    
Home | Imprint | This part of the site doesn't use cookies.