- This can be hosted on a seperate servers to test the breaking out of the iframe functionality. Just make sure that you go through the files and set the correct paths.
- test.html is the entry point
- I used a 350x150 placeholder to demonstrate that the php is returning an image, and can easily be replaced with a 1x1 alpha pixel.
- Make ad images come from the database.
- Add tags table with images' id.
- Implement something similar to an acl in the database, managed by a web app, with the baseurl to get images that are "approved" for that site.
- Host the database on a load balanced database cluster, maybe something like MongoDB since it has excellent sharding.
- I would convert the query to be a single stored procedure.