I don't have the experience to tell you exactly how to completely set up what you are trying to accomplish, but you should be able to create a php or cgi script that would call the Plesk Command Line Utilities, you can find the documentation on how to use the Command Line Utilities at: