Title: [Plugin: Youtube Channel Plugin] Error when creating page
Last modified: August 20, 2016

---

# [Plugin: Youtube Channel Plugin] Error when creating page

 *  [Jerbo](https://wordpress.org/support/users/jerbo/)
 * (@jerbo)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-youtube-channel-plugin-error-when-creating-page/)
 * 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!
 * [http://wordpress.org/extend/plugins/youtube-channel-showcase/](http://wordpress.org/extend/plugins/youtube-channel-showcase/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Keryn](https://wordpress.org/support/users/b-summers/)
 * (@b-summers)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-youtube-channel-plugin-error-when-creating-page/#post-2527845)
 * I am also getting this error…did you ever find a solution?
 *  [constantine.johny](https://wordpress.org/support/users/constantinejohny-1/)
 * (@constantinejohny-1)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-youtube-channel-plugin-error-when-creating-page/#post-2527853)
 * 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);
       curl_close($ch);
       ```
   
 * Next, comment this:
 *     ```
       /*while (!feof($fp))
           {
               $contents .= fread($fp, 8192);
           }
           fclose($fp);  */
       ```
   
 * And it should be working now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Youtube Channel Plugin] Error when creating page’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/youtube-channel-showcase.svg)
 * [Youtube Channel Plugin](https://wordpress.org/plugins/youtube-channel-showcase/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/youtube-channel-showcase/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/youtube-channel-showcase/)
 * [Active Topics](https://wordpress.org/support/plugin/youtube-channel-showcase/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/youtube-channel-showcase/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/youtube-channel-showcase/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [constantine.johny](https://wordpress.org/support/users/constantinejohny-1/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-youtube-channel-plugin-error-when-creating-page/#post-2527853)
 * Status: not resolved