0

actually i have a WORKER.PHP that recieve some post variables and a zip file with a 10k+ data row (csv) then insert the tiny result on mysql, on the other side i have a main page with an ajax call every 5 seconds to a secondary php script than just reply that mysql data in json

i spent a lot of months to develop the php code to parse and process a lot of hated math formulas to give a friendly result and also with extreme efficiency, i'm not able at all to port this big script to javascript so...

Is there a way to recive the same data through nodejs, send this data to a php script, wait for the response (data response,fail, error) and the send this response for all clients conected?

This pic might help

enter image description here

Lajos Veres
  • 13,595
  • 7
  • 43
  • 56
Colas
  • 157
  • 1
  • 2
  • 12

1 Answers1

1

For example with this you can run cli php: http://nodejs.org/api/child_process.html

Lajos Veres
  • 13,595
  • 7
  • 43
  • 56
  • thanks, i found this article about your suggest http://www.scriptol.com/javascript/nodejs-php.php – Colas Oct 23 '13 at 13:19