How to use php with sfs2X?
How to use php with sfs2X?
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??
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: How to use php with sfs2X?
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
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
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Re: How to use php with sfs2X?
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.
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.
Who is online
Users browsing this forum: Stevenor and 71 guests