"# Players Online" for Website

How can I retrieve the player count of a Photon networked game in order to display it on a website? I wish to put the "# Players Online" text on my homepage.

Thank you for your help!


  • EricL
    Perhaps there's an API I can use for this? Would someone please help me with my question?
  • Hey Eric,

    sorry for the delayed answer.

    Are you using Photon Cloud or a self-hosted Photon Server?

    - for Photon Cloud: we don't have a public API for counter access at the moment. We might add something like this in future, but there are no plans for it yet.

    - for Photon Server: there is no built-in API, but there are several possibilities to add one. For example:
    -- implement a Photon operation that returns the number of online players and call it from your web site by using the Java Script SDK (WebSockets)
    -- build a simple web service that reads the "Photon: SocketServer" windows performance counters

    There is also the possibility to get the data from Photon Dashboard service (which would probably be the easiest way)... if you are interested, let me know, and I'll try to find some time to write a tutorial for that.
  • EricL
    Hello Nicole,

    Thanks for the reply! I am using Photon Cloud, so I would very much appreciate a tutorial on the Photon Dashboard service in order to do this. Thank you for your time!

  • Oops, that's a misunderstanding.. I was referring to the Photon Dashboard service that is part of the self-hosted Photon Server SDK.

    There is no way for an API access to Photon Cloud statistics at the moment, sorry. :(