Send Chat Message / RPC from PHP

edited January 2015 in Photon Chat
Hello, everyone.
I'm new to Photon, and I've looked into Photon features and API documentation and didn't find something about the following feature.

We have a turn-based Unity game which uses Photon PUN, Photon Chat. We also have a PHP + mysql backend, where players' data is stored between sessions. Also some events are generated on backend side. There're things like new tournaments, shop sales events, system chat messages.
The thing, we want to achieve, is having an ability to send from Linux / PHP server an event like RPC and/or Photon Chat message directly to clients, who are currently in a game, when something new happens on backend side.

Without having this feature, clients should continuosly poll backend to know if something happened. And this makes a heavy load on our backend.
Is there a way to send some RPC / Photon Chat Message directly from PHP?

The things, I think worth to try, if there're no direct answer to my question:
- use Photon Chat JavaScript SDK and try to join it somehow with PHP to be able to connect to Photon Chat and send mesages to players;
- use Photon c++ SDK for Linux to connect to Photon Chat on backend side and send messages to players;
- use Unity SDK and build for Linux to do the above things.

If anyone has thoughts about this problem, it is very appreciated.


  • Hi,

    we don't have a PHP "client" SDK for Photon, sorry. You can find the supported SDKs for Chat here:

    The C++ or JavaScript SDK might be your best choice. Sorry that we can not provide a tutorial here. If you get it to work and want to share a few lines of code as an example, we would appreciate it!