Comunicate NodeJS and PHP
Posted
by
Zenth
on Programmers
See other posts from Programmers
or by Zenth
Published on 2013-10-24T08:28:19Z
Indexed on
2013/10/24
10:10 UTC
Read the original article
Hit count: 341
i need ideas to solve this:
I have a entire website in PHP (5.2) in a PHP "shared server", only i can use apache+PHP, CGI & NodeJS, no memcached, redis or another software.
And i need to comunicate the PHP and the NodeJS Script.
My first approach is using socket connection, creating in NodeJS a socket listener and connect to it witch PHP, and then, send commands, whait for response, and close connection (and end PHP Script). To the other side, i can call PHP script via ¿httprequest? ¿or using sockets again?
The problem of using sockets fron Node to PHP, i CANT leave PHP script runing with set_time_limit(0) because the fuc... server, need to "call" PHP for another way.
The NodeJS and Apache + PHP are in the same machine, i need to make the code for the fast response time (sockets better than web-calls).
Better ideas or other solutions?
thanks!
© Programmers or respective owner