Skip to content
/ phull Public
forked from leocavalcante/phull

Client-server communication between JS and PHP via Ajax long polling.

Notifications You must be signed in to change notification settings

Samardon/phull

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Phull

Client-server communication between JS and PHP via Ajax long polling.

Usage

Get real-time behavior in 3 simple steps.

#1 - Put it in your server

Drop phull folder into your webserver accessible folder.

#2 - Load de client API

Link the client-side code to your page like any other JavaScript

<script src="path/to/phull/client.js"></script>

#3 - Very easy to use

Now just connect and set the listener for incoming messages:

phull.connect('path/to/phull/', function()
{
    phull.emit({user: 'user123', text: 'hello world', at: new Date});
},
function (message)
{
    console.dir(message);
});

Take a look at example.php for a simple chat example.

See it in action!

About

Client-server communication between JS and PHP via Ajax long polling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 75.0%
  • JavaScript 23.0%
  • ApacheConf 2.0%