:: PHP Developer required to write "copy script"
________________________________________________
Hi there,
I was wondering if someone could assist me with a project i'm currently working on.
Here is an overview my project and requirements;
Scenario;
I will publish an "industry news update" - just an index.html file and 3 folders containing the resources (css, images, etc).
On my webserver under the ROOT is a folder called "news", where the above files and folders are located.
Also in the "news" folder is a subfolder called "member", and within this "member1", "member2", "member3" and so on.
Folder structure overview:
|-/ROOT
|
|
|---/members/
| |
| |----/member1/
| |
| |----/member2/
| |
| |----/member3/
| |
| |----/member4/
|
|
|---/news
|
|----/index.html
|----/css/
|----/images/
|----/pdfs/
What i require is a script that will take the contents of the news folder (index.html, and the folders "css", "images" and "pdfs") and make a copy to ANY subdirectories found
under the "members" folder.
To help you understand better, the reason is as follows.
I wish to produce the news update once a week and upload to the "news" folder. I wish to then run a "copy script" so that a copy of the content within the "news" folder is made
to all members' folders.
Members can then login to an editor, and edit their index.html file to include their own custom content in addition to what i'd provided.
As this would be a weekly update, the script would need to be setup so that before performing the copy function, any previous content in the members' folders would be deleted.
in summary;
1. i upload my latest issue of the html newsletter to the "/news" folder on my server.
2. i then run the copy script, lets say "publish.php"
3. upon accessing the script, i am asked to confirm whether i wish to delete the last issue from all member folders.
4. having confirmed this, the script will then delete all content within the members' folders and copy the files/folders within the "/news" folder to each member folder.
Expected Folder structure after running script:
|-/ROOT
|
|
|---/members/
| |
| |----/member1/
| | |
| | |----/index.html
| | |----/css/
| | |----/images/
| | |----/pdfs/
| |
| |----/member2/
| | |
| | |----/index.html
| | |----/css/
| | |----/images/
| | |----/pdfs/
| |
| |----/member3/
| | |
| | |----/index.html
| | |----/css/
| | |----/images/
| | |----/pdfs/
| |
| |----/member4/
| | |
| | |----/index.html
| | |----/css/
| | |----/images/
| | |----/pdfs/
|
|
|---/news
|
|----/index.html
|----/css/
|----/images/
|----/pdfs/
I am only just beginning to learn php and any assistance with this, or a pointer in the right direction would be much appreciated.
A link to a free script would be amazing, as i couldn't seem to find one, and if this is not available under gpl/free, i would be happy to pay for someone to write this script
for me - please contact me at: anthonyv|at|officeclub.co.uk with a quote and approximate time period for completion if you are interested/able to do this.
In researching this, i thought maybe a php unzip function would do the trick if it was modified to perform the "delete previous issue" function and unzip the file/folder
structure to several locations?
just a thought.
Again, any help would be much appreciated.
Thanks in advance,
Anthony.
PS. if formatting of the folder structures above is not clear, please see the attached text file or:
http://www.anthonyv.net/Anthony_V_Copy_Script_Brief.txt