Re: integrating pusher.com with cakephp
Yeah, it's quite simple. You just import the pusher app as a vendor, or require it which I believe is what the proper way of doing it in 2.2.1 is.
Like this, just put the Pusher.php file they provide in your Vendors folder of your app.
require_once(APP . DS . 'Vendor' . DS . 'Pusher.php');
$pusher = new Pusher('','','');//Your api keys, and stuff go here
Then you can just do
$pusher->trigger('channel','event',arrayofdata);
And you're good to go.
On Tuesday, August 14, 2012 7:05:10 AM UTC-7, Nick Crane wrote:
I'm trying to implement a web socket with PUSHER within an existing cakephp 2.2.1 application. Has anyone attempted anything similar or come across any resources that define what is required, how this can be achieved?--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home