In Feburary 2016 15,
Open your PHP file in a text editor, such as Windows Notepad.
Connect to a remote FTP server. Open a file with the 'fopen(address, mode)' command. The mode needs to be set to 'w' for writing. For example, '$my_file = fopen ('ftp://ftp.myserver.com/myfile.txt', w);' will anonymously connect you to the ftp server and create a new file called 'myfile.txt' that you can write to. To use a non-anonymous account, change the address to use the format 'ftp://username:password@ftp.myserver.com/file'.
Write data to the file using the 'fwrite(handle, string);' command. For example, 'fwrite ($my_file, 'my text');'.
Close your connection once you are done writing to the file with the 'fclose(handle);' command. For example, 'fclose($my_file);'. Once executed, the new file will now have been written to and saved on the remote server.
Save the PHP file.
In Feburary 2016 15,