I'd like to set up a page on an AMP server where a user can submit a PHP file and then request it, with the following constraints:
- the script needs to be authorized; not just any script can be uploaded
- no info about the script should be stored on the server (at first I thought of storing a hash of the file, but can this be avoided, such as by putting the hash check at the beginning of the script itself and ensuring this part exists and is executed first?)
- no MySQL or Apache authentication
- assume safe mode, and the user itself is a script (cURL)
What's an efficient and secure way to implement this?