I would like to set up a cron job that queries a game server every X seconds and then saves the info, so that later I can process the data to create a report of the game server.
I dont want the servers to be queried constantly, but only when requested for.
I see 2 ways of doing this:
a) create an admin page where a cronjob can be created and set to run once. ie queryserver.php?ip=x.x.x.x&port=xxx
b) have the cron job running forever and make an admin page so that the server ips can be added to an SQL database. Then the cronjob will check the database every X seconds for which servers to query and then query them.
I guess we will only use this a few times a week to track a game server while we are playing a match on it, so which is the most efficient way of doing it? And, can you plz provide some links to guides on doing it or I'll just google it if you let me know what to look for.
tyvm
I dont want the servers to be queried constantly, but only when requested for.
I see 2 ways of doing this:
a) create an admin page where a cronjob can be created and set to run once. ie queryserver.php?ip=x.x.x.x&port=xxx
b) have the cron job running forever and make an admin page so that the server ips can be added to an SQL database. Then the cronjob will check the database every X seconds for which servers to query and then query them.
I guess we will only use this a few times a week to track a game server while we are playing a match on it, so which is the most efficient way of doing it? And, can you plz provide some links to guides on doing it or I'll just google it if you let me know what to look for.
tyvm
Comment