You could do something like the following, so that the PHP web page does both jobs:
// assume daily data file will be called "data.txt":
$data = 'data.txt';
if ( file_exists($data) and ( date('Ymd') == date('Ymd', filemtime($data) ) ) )
{
// read the data from the file and output the page
}
else
{
// do the database queries...
// write the data to the 'data.txt' file
// output the data as HTML
}
This way, the first time someone accesses the page on a given day, the database queries be done, but successive accesses on the same day will grab the data from the file, instead.