Aggregate publish via json server with php script or via node

1. What is the problem? Be very detailed.
I have php script for receiving streaming data from ODK aggregate, it doesn't work very well, especially for streaming new data, duplicate values, server returns active_pause and so on...
My question, is it possible to make some js script on node server?
Or someone have better php script?
2. What app or server are you using and on what device and operating system? Include version numbers.
ODK aggreegate, latest. Win 10
3. What you have you tried to fix the problem?

<?php //simple script for receiving existing data $txt = file_get_contents('php://input'); $tmp = 'test.json'; $myfile = fopen($tmp, "a+") or die("Unable to open file!"); fwrite($myfile, $txt."\n"); fclose($myfile); ?>

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Aggregate is no longer being updated. Central, it's replacement, has a great REST API and an OData feed that you can use to get your submissions. Is there a reason why Central wouldn't work for you?

I am aware of everything. Stuck with Central (installation on VM, ubuntu, on win server), problems with form preview. Currently lack of time for debugging.

My recommendation is to try to get Central working. If you are having problems with form preview, write a new support post about that specific problem. That said, form preview issues are usually due to network (firewall, DNS, etc) issues that you'll have to resolve with your IT.

If you lack time for the above, switching to ODK Cloud requires no time (but does require money).