View Full Version : Block questions
Janderson
20-05-2005, 03:35
Has anyone tried to get a script to handle more than one server? Like at least 2 or more...
Anyone.... ? :confused:
you can load more than 1 block to web site but not 2 servers in 1 block not that i have seen
PsychoGamer
21-05-2005, 22:49
Has anyone tried to get a script to handle more than one server? Like at least 2 or more...
Anyone.... ? :confused:
I did basically the same thing with a game server block. My game server block utilizes the N4Admin the same as my Teamspeak block utilizes the webpost utility. You can just hit the database and return a record set with the TS server information, then put the block code within a loop that changes the values for the IP and UDP port info. In my TS block script, it would go somehting like this:
// ******** Leave this at top of script ********
if (eregi("block-TeamSpeak_nuke.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
// ******** Leave this at top of script ********
// ******** Add this ********
global $db;
$res = $db->sql_query("SELECT * FROM webpost_weblist ORDER BY server_id");
$serverCount = mysql_num_rows($res);
if ($serverCount==0) {//Error Message}
else {
while ($rowData = mysql_fetch_array($res)) {
$ip = $rowData["server_ip"];
$upd = $rowData["server_port"];
// ******** Add this ********
.
.
.
// ******** Remainder of original block code goes here ********
.
.
.
// ******** Add this ********
}
// ******** Add this ********
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.