Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Evented I/O for PHP

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 deps
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
README.md

Node.php

Evented I/O for PHP

Example HTTP server

<?php

$http = new node_http();

$http->listen(8080, function($request, $response) {
    $response->end("yay, super awesome response");
});

nodephp_run();

?>

To build:

First build nodephp as a php module

git clone git://github.com/JosephMoniz/node.php.git
cd node.php
make
sudo make install

Then you must add the following line to your php.ini

extension=nodephp.so

Now you can go and run the example script

php src/test.php

Now if you point your browser to 127.0.0.1:8080 you should see the response being served by the test script via nodephp

Something went wrong with that request. Please try again.