download file from database, upload to a file server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

nayeemmz
Forum Commoner
Posts: 32
Joined: Fri Jun 29, 2007 7:19 pm

Post by nayeemmz »

Thanks Volka,

Finally this code,

Code: Select all

$sftp = ssh2_sftp($conn);    

 $file = fopen("ssh2.sftp://$sftp/path-to-file-on the remote server", "w")
 
  fputs($file, $var);  

 //$var is the variable where I stored the database output that needed to be sent to the file server

 fclose($file);
did the trick. Thanks for spending your time on this.

May be someone else could also use it.

Thanks

-Nayeem
Post Reply