Since NowJS uses Socket.io, and Socket.io provides a plain HTTP transport called htmlfile (as opposed to WebSockets), it might be possible to make an HTTP POST request to the server by using curl or pecl_http or file_get_contents. However, NowJS has its own conventions for the data format. Instead of re-implementing this format in PHP I would suggest an alternate approach:
Create a third HTTP server in node (in the same process as your NowJS server) that listens on a separate port, such as 8081. This HTTP server is the web service for your application. Your PHP application makes a request to the third web server. The third webserver parses these requests and triggers events through NowJS (since accessing that scope is trivial with node).
It would look something like this:
var http = require('http');
var nowServer = http.createServer();
nowServer.listen(8080, "127.0.0.1");
var everyone = require("now").initialize(nowServer);
var apiServer = http.createServer(function (req, res) {
switch (req.url) {
case '/do_something':
everyone.now.doSomething();
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end();
break;
default:
res.writeHead(404, {'Content-Type': 'text/plain'});
res.end('No such service\n');
break;
}
});
apiServer.listen(8081, "127.0.0.1");
Double warning: This is completely untested and I have never used NowJS.