Hi,
I need to file_get_contents of multiple website dynamically, so I use arrays in a loop to connect to. Here's a snippet:
for ($i = 1; $i < sizeof($linkarray[0])-3; $i++){
echo ("<a href=" . $linkarray[1][$i] . "> <font color='red'><b>" . $linkarray[2][$i] . "</b></a></font><br><br> ");
$ccontent = file_get_contents($linkarray[1][$i]);
$rele = preg_match("/".$pieces[0].".*/", $ccontent, $rel);
ECHO $rel[0]."<BR><BR>";
}
So it loops, and gets the contents of some sites, yet when I echo the output array $rel[0]; I get Failed to stream for each one, despite them being valid URLs.
If someone could help it would be great 🙂,
Thanks,
Lee.