Answer the question
In order to leave comments, you need to log in
How to write FTP connection in php script?
How to organize sequential data entry for connection?
In a php script using ssh I want to specify an FTP connection to delete the .zip file.
If you connect in the terminal, then you need to enter ip, login, password in turn. I don't understand how exactly to organize this input in the script.
It is necessary that the server on which the site is located remotely connects to my other server and deletes the archive there.
At first I thought that it would work with wget ftp:// , but I could not think of any solutions.
Tell me if you can.
$cmd = "wget site.ru/123.zip && после того как файл загрузится, удалить его;";
ssh::exec_cmd($cmd);
Answer the question
In order to leave comments, you need to log in
This is how I decided:
curl ftp://site.ru/ -X 'DELE myfile.zip' --user username:password
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question