How would I go about catching a request for images that doesn't exist and create them as needed so as not to return a 404? These would then be stored on the server until no longer needed and deleted. The code would preferably be in PHP. Deletion will most likely occur in a cron job.
The images would be requested in batches of 10 or so at a time with names such as 084a007b0138024f0a.jpg.