Trouble modifying file programmatically from a remote

Hello, I am trying to modify a file on my site with a Node.js app via FTP. How can I do this? I have the code from the NPM “ftp” module example (modified to my needs of course). The callback fires with no errors to show for but the file remains the same.
Alternatively, how can I modify the file with PHP or the likes? This will require authorization of some sort - POST data will be great if possible. I’ve tried it, but whenever I try to run the PHP page I get an error page telling me to use a JavaScript-supportive browser.
Thanks ahead!

I’ve never used the NodeJS ftp module, but I can tell you that FTP is probably the best way to edit your files.

You can edit files from within PHP scripts on your website as well. However, please note that only regular browsers can access websites on InfinityFree, API access from external applications is not possible.