I have developed a few php script installers. Take a look at the example below. The example works only with cpanel servers but I have coded installers to install on servers other than cpanel.
Example:
http://www.linkjen.com/wordpress-mass/setup.php
Let me know if I can help.