Entry
How can I generate a html file each day with content from MySQL, fully automated?
Anyone have any ideas for generating a daily statistics page for database records?
Jun 13th, 2000 15:52
Alok Sinha, Luc Demarteau, unknown unknown, Jean-Marc Molina,
You will need to create a php script that reads the data from mysql
database and reports the output in a web page. Then you would need to
run this script from the cron job. To run this script from cron job, you
could either launch a program like lynx to launch this or if you have
the cgi version of php installed, execute the php script followed by the
php script name.
Steps :
write a php script (script.php) to
connect to db
login to db
query contents
write output to a local file, call it something.html
in the cron, make entry lynx http://yourservername.com/script.php
or php /path/to/script.php
That shud do your job.