Thanks for your reply.
Maybe it would be better if I explain what i'm trying to do before attempting this so I can get an idea on whats the best way of doing it. Here goes ...
I want the client to hit a submit button which will call a function to grab the software files (from a directory/database?)
Insert their unique license number into each PHP file
Zip the licensed software and output the download on screen
Now I know how to grab all the PHP files and I know how to insert the license key into the files along with outputting the download. Its just putting it all together I am not having much luck with. Its all just getting so confusing.
And a problem for this would be ... if doing this from a directory on the server, I would need to copy the files to a temporary location first then write to the files ... and then there is the permissions on the directories that need to be fiddled with.
Is there a way I can do this via a MySQL database (copy, write and output) rather than directly on the server?
I am open to any ideas anyone can share.