Đang Thực Hiện

146104 Copy/Replace script

We require a php 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ì, PHP

Xem nhiều hơn: webpage scripts, make own webpage, replace, just some copy, gauge, copy t, copy code, database copy script, php script rename files, database note taking, rename url, php script path, user enters file name, error exists page, php directory copy, sub script, footer copyright, php copy directory, php copy files directory, php script webpage, php copy file, php script copy files directory, copy file directory php, copy files directory directory, link replace

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

ID dự án: #1892281

Được trao cho:


Hi, Please see PMB for demo and more details. Best Regards ... ccpplinux

$100 USD trong 5 ngày
(143 Đánh Giá)