gather data from game server
So, I would like to show the server admins on a web page. To do that, I will need to access the users.ini file. I can think of some ways to solve the problem, but I'm not sure which one would be optimal.
The first two options would need a mysql database. 1. Add all users to the database through the plugin itself. or 2. send a socket post request to the web page. There, parse the data and add to the database. The third one would be to send a rcon command to the game server which would return the users that are in the file. Would need to search about that one though, but I found this article on the valve developer so it should be possible. https://developer.valvesoftware.com/..._RCON_Protocol Let me know if you have any ideas. |
Re: gather data from game server
There are several PHP tools for sending RCON queries to HL1 and HL2 servers. However, many web hosts don't allow external connections so this isn't an option, at least it's not an option with my host (at the level that I've purchased). Granted, if you have this limitation, you'd probably have a limitation for a common database too.
Using a common database, if possible, would probably be the best IMO. Sadly, for my website, the only option I have is to send POST or GET queries from the game server which isn't the best for what I'm wanting to do with my custom plugin. |
Re: gather data from game server
Thank you for the input
|
Re: gather data from game server
I'd suggest using the module CURL it supports alot of protocols.
|
Re: gather data from game server
You could build a mini server plugin that can send a list of admins when requested. UDP instead of TCP will make it even simpler.
|
Re: gather data from game server
Quote:
Quote:
I created a socket and connected it to localhost on a random port. Every second I checked if there is data to be received. During the tests, I noticed that socket_is_readable lags the server. I will probably stick with the SQL method. Below is the plugin I made, in case you want to try it. Code:
|
Re: gather data from game server
Try this module, using socket_unblock() to eliminate the lag
|
Re: gather data from game server
I'm currently testing on windows, I could only find the linux compiled binary.
|
Re: gather data from game server
|
Re: gather data from game server
Looks the same, still lagging when calling socket_change
Code:
|
| All times are GMT -4. The time now is 02:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.