|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
uploading a file to more than one server: useing PHP's FTP function
Hi,
I want to make a quick little app to save time for something I have to do in work. I frequently have to upload a latest.gif to 4 different web servers using FTP programs. This is quite annoying so I decided I am going to try to make a PHP script that will upload the file to all 4 web servers at once from one form field and 1 submit button. Does anyone know how I would do this? The servers are all duplicated of each other and have the same password and username as well as paths etc. It would be very handy if I could put this together and would be one less monotonous task for me to do every day. Thanks in advance, Martin PS: This doesnt need to be too advanced, it just needs to upload the image to the 4 servers and to confirm that the upload worked. |
|
#2
|
||||
|
||||
|
Just make a loop that goes through each address to upload to and repeat the ftp upload to each one.
Something like this: (this is untested, written on the fly) PHP Code:
|
|
#3
|
||||
|
||||
|
What do you have so far? There are examples in the manual and it's about the same as fopen(), fwrite(), etc...
PHP Code:
---John Holmes... |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > uploading a file to more than one server: useing PHP's FTP function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|