Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 examples php examples July 24, 2011
Octocat-spinner-32 lib license July 24, 2011
Octocat-spinner-32 tests tab error July 24, 2011
Octocat-spinner-32 README
Octocat-spinner-32 index.js license July 24, 2011
Octocat-spinner-32 package.json
README
PHP session handler with node.js


var http = require('http'),
    url  = require('url'),
    session = require('nodePhpSessions').SessionHandler;

var sessionHandler = new session();

var server = http.createServer(function (req, res) {
    var parsedUrl = url.parse(req.url, true).query;
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end(sessionHandler.run(parsedUrl));
});

server.listen(5672, "127.0.0.1", function() {
  var address = server.address();
  console.log("opened server on %j", address);
});
Something went wrong with that request. Please try again.