Youtube Channel Plugin
Error when creating page (3 posts)

  1. Jerbo
    Posted 3 years ago #

    I get this when I try to create the page:
    Youtube Channel "soccer" not found
    Warning: Invalid argument supplied for foreach() in /home/viptech2/public_html/ievilstudios.com/wp-content/plugins/youtube-channel-showcase/youtubechannel.php on line 41

    I even put the recommended code.
    please help!


  2. b-summers
    Posted 3 years ago #

    I am also getting this error...did you ever find a solution?

  3. constantine.johny
    Posted 2 years ago #

    Hi, I had the same error.
    You probably have fopen disabled on your hosting...

    To fix this, open youtubechanel.php and fix these lines:

    Find function function xml2array($url, $get_attributes = 1, $priority = 'tag')
    Comment this:

    /*  if (!($fp = @ fopen($url, 'r')))
            return array ();
        } */

    And just after those lines add this:

    $ch = curl_init();
    $timeout = 0;
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);

    Next, comment this:

    /*while (!feof($fp))
            $contents .= fread($fp, 8192);
        fclose($fp);  */

    And it should be working now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Youtube Channel Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic