and if your visitors could add a file name, its not so safe.
create a folder with his/her session id,
if(!file_exists(session_id()))
mkdir(session_id());
$server= 's7/bin/'.session_id();
and use some kind of encryption to keep these file names safer:
$name= md5($filename);
if i were you, i'm just print the embed code to the javascript,
print 'Embed code:<br> <textarea name="textarea" cols="60" rows="5"> <script src="http://javascripthost.com/'.$server.$file.'" language="JavaScript1.2" type="text/JavaScript1.2">
</script></textarea>';
You might solve this javascript creator with one php file. You can print the form with php.
When you create the javascript, printing <br> into javascript is not so valid, if you want a break into that file, you can print "\r\n"
$copyright= '// JavaScript created with javascripthost.com'."\r\n";
Hello,
jjozsi