Skilled Illusionist
- Joined
- Aug 18, 2005
- Messages
- 305
- Reaction score
- 78
Dont ask me how to use this. If you are to stupid to figure it out you shouldnt be hosting anything at all.
Server Status:
Online Players:
As for the config.php you need something that connects to the DB... I would guess you could use something like..
Work on this part for yourself. Trying to keep the leechers out.
Have fun.
Server Status:
Code:
<?php
$fp = @fsockopen("127.0.0.1", 5051, $errno, $errstr, 1);
if($fp >= 1){
echo '<font color=green>Online</font>';}
else{ echo '<font color=red>Offline</font>'; }
?>
Online Players:
Code:
<?php
include '/config/config.php';
$query = mysql_query("SELECT * FROM user WHERE online='1'");
$numrows = mysql_num_rows($query);
echo $numrows;
?>
As for the config.php you need something that connects to the DB... I would guess you could use something like..
Code:
$server['address'] = '127.0.0.1';
$server['user'] = 'root';
$server['pass'] = '';
$server['port'] = '3306';
Work on this part for yourself. Trying to keep the leechers out.
Have fun.