Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Pusher API Extension Right now, this extension is only designed for Linux systems. Perhaps in the future, I'll look at building it on a Win box. To install it, you must have the PHP source for your version. Then run the following commands. $ cd /path/to/php-5.4.0/ext $ git clone git://github.com/payden/pusher.git $ cd pusher $ phpize && ./configure && make $ sudo make install Provided there isn't a problem building, this will put pusher.so in your extensions directory. This is usually in /usr/local/lib/php/extensions somewhere. You may or may not need to ensure you're 'extension_dir' directive in php.ini points to the correct path. Then all you have to do is add a 'extension=pusher.so' line to your php.ini and restart php. Now, to use the class the extension implements. $pusher = new Pusher('api_key_from_pusher', 'api_secret_from_pusher', app_id_from_pusher); $pusher->trigger('channel','event','json_encoded_string'); For example: $obj = new StdClass(); $obj->name = "Payden Sutherland"; $obj->email = "firstname.lastname@example.org"; $pusher = new Pusher('59e7d83ee9fb65bfe028', 'mysecretkey', 16648); $pusher->trigger('test_channel','weeeee', json_encode($obj));