A simple PHP script that will create or modify the robots.txt in all sub domains on a server to disallow indexing.
Very useful for large staging servers.
Place this file at the root of the server and navigate to it with your browser.
That is all you need to do.
If the robots.txt doesn't exists it will be created. If it does exists it will be modified and a backup will be made (just in case).