GStats - What DO the clients do?

basically, you can record events from your server.
Example:
*Player dies.
*A hook on the gamemode gets that and does a http.Get
*http.get sends stuff to a script and then the information gets added to mysql
**Coming soon: *shows it in a graph

You could do things like http://www.steampowered.com/status/ep2/achievements.php for puzzle gamemode to see how hard a puzzle is to get to.

You can record anything really.

http://www.costeira.com/scripts/gstats/

screenshots:

http://costeira.com/upl/uploads/example1.png

It has pagination so you wouldn’t see hundreds of rows, only 30 per page

Wow that’s a shitty method of logging stuff. Directly interacting with MySQL is a much better solution.

I haven’t looked at the code and I never learned GMod Lua, though.

Edit: I read your post wrong

:downs:
What I said was that you should use a server extension to directly communicate with the MySQL server…

Like a dll?

Yes.
Like this: http://www.facepunch.com/showthread.php?t=241247

ok, but [lua]require( “mysql” )

local db, error = mysql.connect(“127.0.0.1”, “username”, “password”, “database”)
if (db == 0) then print(tostring(error) … "
") return end

print("connection opened - " … db … "!
");

test, isok, error = mysql.query(db, “SELECT * FROM names”);
if (test) then
PrintTable(test)
end
if (!isok) then
print(tostring(error) … "
");
end

test, isok, error = mysql.query(db, “SELECT 1 + 1”);
if (test) then
PrintTable(test)
end
if (!isok) then
print(tostring(error) … "
");
end

test, isok, error = mysql.query(db, “INSERT INTO names (SteamId,Name) VALUES(‘fuck me!’,‘it worked’)”);
if (test) then
PrintTable(test)
end
if (!isok) then
print(tostring(error) … "
");
end

local succ, error = mysql.disconnect(db)
if (not succ) then
print( error );
end
print("connection closed!
");
[/lua] is a bit bigger than [lua]http.get(“stuff”)[/lua]

But the top 1 is faster.

good job copying the what.cd homepage

[editline]02:03PM[/editline]

nevermind, you practically ripped their stylesheet

[editline]02:05PM[/editline]

and you’re horrible at css

I know. it’s until I make a better design, because I’m worse at design than css

Actually HTTP Get isn’t a bad method at all. Using a php script to handle things with a special session key to prevent abuse is much more secure than keeping mysql details.

Thank you, I just chose http get because:
*it’s smaller
*login stuff

what do you mean login stuff?

Even on the server?
Which I assume is what this runs on.

so you only add events to your log, and not everyone elses

you’re doing it wrong