Đang Thực Hiện

161244 Copy files/replace text script

We require a php or perl script to copy files from our webspace to our client's webspace, replace some text in some files (it doesn't matter if this is before or after copying - your choice), and then chmods some files.

We want 2 scripts but the code for both should be similar for most of it:

a. Allow them to create a password protected directory on OUR domain first for their use. They can then create another directory in this (step 1 below) to copy files etc from another directory on our webspace.

b. Copy files etc to their own DOMAIN. This domain can be on the SAME server as the original files, etc (if easier).

The basic steps are as follows:

1. A form is displayed where a user enters the path to HIS webspace, his URL (if needed?), and a name for a new directory.

2. Clicks "submit" button.

3. Directory is created in HIS webspace with this new directory name. If directory already exists for another user or error in path, he is told to try again.

4. All files and directories are then copied from a master directory in OUR webspace (URL: [url removed, login to view]), (PATH: "home/local999/www/xfiles/original) to HIS new directory (details from step 1 above).

5. Another form is then displayed with various editboxes: "Name:", "ID Number:".

6. User fills out these editboxes.

7. Clicks "submit" button.

8. Some unique text ("TOKEN1", "TOKEN2", "TOKEN3", etc) already within the code of .php files (including .php files in sub-directories) that were copied to HIS new directory is replaced with the text in the editboxes. All .php files in sub-directories are also searched and text replaced if necessary.

For example:

When "TOKEN1 is found in the code of any .php file, it is replaced with the text that the user entered in the "Name" editbox, When "TOKEN2" is found in any file, it is replaced by the text that the user entered in the ID editbox, etc.

Note that it is important that the code in the files is actually changed so, in future, the user can look at "his" page to get the details. It must NOT use a database. If it is not possible to change .php code, I am willing to just have .txt files in the master directories and have the script rename these in the destination to .php extensions, if this works (unless you know a better way) but it is important that the actual .php code is changed.

9. Some files/directories are chmoded to 777: directories called "data" and "content" and files called "[url removed, login to view]" and "content/[url removed, login to view]". Files called "[url removed, login to view]" and "[url removed, login to view]" are chmoded to 755. Please clearly comment the section of code that does this.

10. A webpage is displayed saying "Finished. Thank you for your submission", with a link to one of the files ("[url removed, login to view]") in his newly created directory.

Each section (as above) should be separated with, for example," // ########## COPY START" and " // ########## COPY END" etc and operations well commented throughout for any changes I may wish to make later.

The script must have a consistant look throughout so [url removed, login to view] and [url removed, login to view] files must be included.

During lengthly processes (such as file copying?), something should be displayed, such as a gauge or file names being copied, to let user know that operations are taking place - not just a blank screen.

Also I will own the copyright.

Kỹ năng: Bất kì công việc gì, Perl, PHP

Xem thêm: webpage scripts, make own webpage, unique text, replace, just some copy, get files, gauge, copy t, copy code, database copy script, php script rename files, database note taking, perl change file, rename url, php script path, user enters file name, perl script file, change text file, error exists page, php directory copy, sub script, comment perl code, footer copyright, php copy directory, php copy files directory

Về Bên Thuê:
( 47 nhận xét ) Sheerness, United Kingdom

Mã Dự Án: #1907433

Đã trao cho:

erevensoft

Please see PMB for details

$40 USD trong 1 ngày
(0 Đánh Giá)
0.0