added genevent.php, code to generate events.