Contact between a GMod server and a website?

Hey again everyone.

I was wondering how to tackle something like connecting between a GMod server and a Website. I got this idea from an addon that can manage a server live from a website. I don’t remember the name of the addon. The only way I see, would be to do some MySQL reading and writing. But this seems very inefficient.

Any help is appreciated :smiley:

  • Fillipuster

Take a look at the RCON protocol - Source RCON Protocol - Valve Developer Community

That’s only for connecting webserver to gmod server, if your wanting to feed data from the gmod server to a webserver use http.Post

Id like to know this too. And how on a website side. Do you recive the info and print in a table. Ie like the statitistics in coderhire.

so. I know how CH scripts post with statistics but how do you sort. Id like to make my own API sort of area.

Quite easily.



table = {
	wing = "wong",
	wangs = 4,
	}
	
http.Post(
	"http://yoursite.com/file.php",
	table,
	function()
		print("Success!")
		end,
	function()
		print("Something went wrong!")
		end
	)




<?php
$wing = $_POST["wing"];
$wangs = $_POST["wangs"];

// Do whatever with the data
?>


Put the data into a database, write to a text file or do whatever. There are parameters to onSuccess and onFailure on the wiki if you wish to use them.