How would I use this class?

Hi there everyone!

I’m familiar with utilizing functions but I don’t think I’ve ever successfully figured out how to use a class. Here’s what I’m trying to use: https://github.com/gak/phpquake3/blob/master/phpQuake3.php

And what I’m trying to do is to pass an rcon password and command (in this case, status) to a game server via 1.2.3.4:30120.

Could someone give me a real world example on how I would use this class to pass those two vars to a gameserver?

Presumably:

<?php
include_once('phpQuake3.php');

$con = new q3query("1.2.3.4","30120");
$con->set_rconpassword("wark");
$con->rcon("status");
?>
1 Like