Jump to content

script that downloads edits then reuploads


ronnie88

Recommended Posts

Okay I am looking for a script that downloads a remote files using ftp access then edits a file..... adding lines to a text file... then closes the file then reuploads the file back to the remote server is there any scripts out there that does this? thanks in advance. Also the script would have to be editable in the sense of directory of the remote server, remote server, username, and password in a form.... Thanks again!

rule 1:  if you can imagine it, someone has already done it

 

so yes I'm sure, somewhere out there, a script exists to do this, however, it is simple enough it would take less time to just roll your own.

 

You will need:

 

http://us.php.net/ftp

 

http://us2.php.net/manual/en/ref.filesystem.php

 

do a search for "php filesystem functions" and you will find tutorials about opening and writing to files.  If this is unix, you might also just consider using system() or exec() to append the file using unix STDIO redirection (aka system("echo $line >> $file")  )

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.