DawnSpy is a flash gaming site written primarily in PHP. It's designed to run on a LAMP server and may require some database creation to get working.
This Github page includes all content originally created for the site as well as distributed online games, which you're welcome to use in your own site.
Hopefully this open source code will help anyone seeking to build their own website.