In JavaScript it is possible to read messages like this:
pusher = new Pusher('ae104dc5763aeef9aa52');
tradesChannel = pusher.subscribe('live_channel');
tradesChannel.bind('live_event', function (data) {
# process it !
});
How to achieve the same using PHP?
From my understanding the PHP library does send to channel, but can't read from it: https://github.com/pusher/pusher-http-php
The Pusher PHP Library is for interacting with the Pusher HTTP API not with the their websockets.
Maybe you can achieve your goal with their webhooks? Webhooks allow your server (so also PHP) to be notified about events occurring within Pusher. https://pusher.com/docs/webhooks