Skip to content

Php library to communicate with Centrifuge version above 0.7

License

Notifications You must be signed in to change notification settings

SmartCrowd/phpcent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phpcent

Php library to communicate with Centrifuge version above 0.7

Library is published on the Composer: https://packagist.org/packages/sl4mmer/phpcent

{
    "require": {
        "sl4mmer/phpcent":"dev-master",
    }
}

Full Centrifuge documentation http://centrifuge.readthedocs.org/en/latest/

Basic Usage

        
        $client = new \phpcent\Client("http://localhost:8000");
        $client->setProject("projectId","projectSecret");
        $client->publish("basic:main_feed",["message"=>"Hello Everybody"]);
        $history=$client->history("basic:main_feed")];
        

All api methods for managing channels has shortends. You can call other methods trough Client::send()

$client->send("namespace_create",["name"=>"newnamespace"])

You can use phpcent to create frontend token

	$data['token']=$client->setProject($data["project"],$secret)->buildSign($data["user"].$data["timestamp"]);         

About

Php library to communicate with Centrifuge version above 0.7

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%