[Request] PHP Client Class

edited August 2010 in Photon Server
Hello all!

I plane to write PHP Client Class for server in-world administration, which can't be made on database side (cause it mainly used for game works state backup).

But I wish do not reinvent the wheel and If some one already have such core Calss methods which connects to server, can send operations and receive events and error codes it will be nice to see them in this forum.

May be you do not have script but know some helpful information for its creation. I'll be glad to see the links and your experienced opinions :)

If some one interesting, for now i found only this correlating links:

On Connect - Server Side [Resolved] viewtopic.php?f=5&t=101&hilit=php

Comments

  • Hi Kembl,

    Can you give an example of that you want to manage with php?

    There is currently no supported way to make php talk to Photon by operations. It's not exactly feasible to use php, if you want to send operations and not just modify the database or setup files. If absolutely needed, you could safe a lot of work by getting into ASP / ASP MVC. Then you can use the DotNet libraries for Photon.

    I would usually prefer scripted webpages over compiled ones but here we use Microsoft's MVC framework for DotNet and it's resonably easy to work with.
  • Thank you Tobias, for your answer.

    >Can you give an example of that you want to manage with php?

    All game administration actions while account in game like kick, level up, seize item, teleport to location. And several other game world actions like in-game events manage, announces, etc. In this case only database manipulations will not have effect, cause database only stores current game state for use it when server reboot.

    This was first idea, to use .Net with IIS, but second idea was "I will need integrate ASPX site with my CMSMS (PHP) game portal" and "Development is long time process and every time I need to compile the scripts before check it", and "I do not wish to support ISS server all game life only for game administration, cause I have got well worked unix apache2 server for such needs".

    >There is currently no supported way to make php talk to Photon by operations.

    I do not see some problems there, I think that PHP Class logics may be like this:

    1) start_operation($opcode, $params) - this is PHP class method
    2) Php connects* to Photon server like ordinary user (of cause with administrative privileges)
    3) Php send operation for process
    4) PHP get result code
    5) PHP disconnects from Photon and start_operation returns some result code

    *- it can have persistent connection for one web-request if situation needs to process several operations.

    >I would usually prefer scripted webpages over compiled ones but here we use
    >Microsoft's MVC framework for DotNet and it's resonably easy to work with.

    You right, this way will be much faster until some one writes PHP class, cause for PHP much more free portals and CMS exists, which can support admin panels for game services. On other way, who knows how much releases will get Photon, every time something may changes, which will provide needs of PHP side modification.
Sign In or Register to comment.