Page 1 of 1

How to use php with sfs2X?

Posted: 14 Dec 2012, 06:54
by liverol
I want to use php/webpage to show the server status,like zone users number,health or something like that,how i can get this data using php/webpage??

Re: How to use php with sfs2X?

Posted: 15 Dec 2012, 17:21
by ThomasLund
You can code a small servlet / jsp page / extension to show data

Cant remember if there is anything in the docs about this. Try to take a look in the main forums, as this isnt a Unity question really

Re: How to use php with sfs2X?

Posted: 18 Dec 2012, 08:42
by Lapo
PHP is not supported by SFS2X.

There are four ways to accomplish what you ask:
1) Use the internal SFS2X webserver which runs regular Java and Python servlets. We have an example of a Python servlet under the {SFS2X}/www/example/ folder.

2) Add a small Extension on the server side that stores the current amount of users in a database table every 1 minute. Then you can read that value from any other webpage (even using PHP) and publish it.

3) Create a small Flash widget that directly access the server and retrieves the value via an Extension call, and embed it in your page

4) Same as above but use the HTML5 API.