0

I have a device that logs movement with a sensor and (via PHP) sends the log file to the FTP server every 10 seconds. The device essentially POSTs a message to a PHP script which then modifies the file on the FTP server.

I want to monitor the logging without having to reopen the file again and again.

This shouldn't really be too hard to code, just refresh the content of the file every time there's a request to the server. Is there way to update, say, Notepad++ every time the file changes? My Google searches have not been successful.

closed as off-topic by Dave, karel, DavidPostill, nc4pk, mdpc Feb 4 '16 at 0:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Dave, karel, DavidPostill, nc4pk, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    There's no "POST" request in FTP. So, does the device upload the log by HTTP POST or does it really upload by FTP (but by FTP STOR request)? – Martin Prikryl Feb 2 '16 at 10:11
  • 3
    Software recommendations are off-topic here. So if you want to avoid your question being closed, reword it to ask for a solution, not a software. I.e. "How do I do live display of a log file from FTP server?" – Martin Prikryl Feb 2 '16 at 10:13
  • Oh yeah, I forgot to mention: The POST request is sent to a php script which then writes the POST data into the file on the FTP. – luke Feb 2 '16 at 11:28
  • I used your suggestion to update the title, I hope it won't get closed. – luke Feb 2 '16 at 11:41
1

Use WinSCP with Directory Synchronization option. There is synchronize script which will make it automatic. Check the Automate file transfers (or synchronization) to FTP server or SFTP server guide.

Then Notepad++ should notify about changes made in file automaticly. The option you're probably looking is disabling the confirmation which can be found in Settings -> Preferences -> MISC -> Update silently.

There is also DocMonitor plugin for Notepad++.

Document updater updates your opened documents in Notepad++ every 3 seconds

You can find it in Plugins -> Plugin Manager -> Show Plugin Manager as Document Monitor.

  • 1
    Keep up to date function is for "local to remote" direction. I believe that OP is asking for "remote to local". – Martin Prikryl Feb 2 '16 at 10:14
  • @MartinPrikryl You're right. I've edited my answer to the correct option. – Wobbly Feb 2 '16 at 10:20
  • Alright, I installed WinSCP and the Directory Synchronization is working. I'm just clueless how to execute a script to do the synchronization for me. Help please? I tried running a "winscp.com /script=myscript.txt" command in my CMD, but the command is not recognized.. – luke Feb 2 '16 at 12:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.