title: Warning: file_get_contents() expects parameter 1 to be a valid path, array given 16
body: <p>I have got a problem with my script, I'm trying to connect to each url for each array, but I got the warnings. Warning: file_get_contents() expects parameter 1 to be a valid path, array given: in /home/myusername/public_html/simple_html_dom.php on line 78</p>
  
  <p>Here is the line 78 for simple_html_dom.php:</p>
  
  <pre><code>$contents = file_get_contents($url, $use_include_path, $context, $offset);
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/ytestbox/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  
  Warning: file_get_contents() expects parameter 1 to be a valid path, array given in /home/myusername/public_html/simple_html_dom.php on line 78
  </code></pre>
  
  <p>Here is the PHP:</p>
  
  <pre><code>&lt;?php
  ini_set('max_execution_time', 300);
  $errmsg_arr = array();
  $errflag = false;
  $link;
  include ('simple_html_dom.php');
  
  
      $base1 = "http://www.mysite.com/get-listing.php";
      $html = file_get_html($base1);      
  
      $xml .= "&lt;?xml version='1.0' encoding='UTF-8' ?&gt;";
      $xml .= '
  &lt;tv generator-info-name="www.testbox.elementfx.com/test"&gt;';
      echo $xml;
      $links = $html-&gt;find('p[id=links] a');
  
      foreach ($links as $element) 
      {
        //open each url in each array
        $urls[] = $link-&gt;href;
        $url = $urls;
        $data = file_get_html($url);
        echo $data;
      }
    }
  ?&gt;
  </code></pre>
  
  <p>Can you please tell me how i can connect to each url for each array when I get the list of urls from get-listing.php using with simple_html_dom?</p>
  
  <p>EDIT: Here is the result:</p>
  
  <pre><code>string(72) "http://www.mysite.com/get-listing.php?channels=ABC FAMILY&amp;id=101" 
  string(65) "http://www.mysite.com/get-listing.php?channels=CBS&amp;id=102" 
  string(69) "http://www.mysite.com/get-listing.php?channels=CNN USA&amp;id=103" 
  string(70) "http://www.mysite.com/get-listing.php?channels=ESPN USA&amp;id=105" 
  string(70) "http://www.mysite.com/get-listing.php?channels=Fox News&amp;id=106" 
  string(75) "http://www.mysite.com/get-listing.php?channels=Animal Planet&amp;id=107" 
  string(73) "http://www.mysite.com/get-listing.php?channels=USA Network&amp;id=108" 
  string(67) "http://www.mysite.com/get-listing.php?channels=SPIKE&amp;id=110" 
  string(71) "http://www.mysite.com/get-listing.php?channels=BRAVO USA&amp;id=111" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO1&amp;id=112" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO2&amp;id=113" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO3&amp;id=114" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO4&amp;id=115" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO5&amp;id=116" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO6&amp;id=117" 
  string(68) "http://www.mysite.com/get-listing.php?channels=BRAVO7&amp;id=118"
  </code></pre>