Thursday 3 January 2019

php - file_get_contents and div

What's wrong with my code?
I wish to get all dates from
but my array is empty.



$url = "http://weather.yahoo.com/";
$page_all = file_get_contents($url);

preg_match_all('#
(.*)
#', $page_all, $div_array);


echo "
";
print_r($div_array);
echo "
";
?>


Thanks

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...