Jump to content

How to open a text file and add lines on a remote server


ronnie88

Recommended Posts

Hi I am attempting to write a script that opens up a .dat or a text file and adds a few lines on a remote server that I know the password and username on. Can anyone help me get started? Thanks a bunch if there is a code already out there can you please forward it on here thanks again.

I assume that file wrappers work for FTP connections.

 

You could try using a file wrapper with fopen in append mode.

 

If that doesn't work, you could download the file, use string concatenation to append the new lines, and then upload the new version. That could get problematic if there are several copies of your script hitting the server at once.

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.