I just started using php and really have hardly any idea what I'm doing... but i am getting unexpected $end and I am clearly over seeing something... please help!
Code:
[/code]
Code:
<?php
include('mc/init.inc.php');
$info = fetch_server_info($config['server']['ip'], $config['server']['port']);
?>
<html>
<head>
<title><?php echo $config['server']['ip'] ?></title>
</head>
<body>
<h1><?php echo $config ['server']['ip'] ?></h1>
<?php
if ($info === false){
?>
<p>
Status: Offline
</p>
<?php
} else {
?>
<p>
Status: Online
</p>
<p>
Slots: <?php echo $info['playerCount']; ?> / <?php echo $info['maxPlayers'] ?>;
</p>
<p>
Players Online: <?php echo implode(', ', $info['playerList']); ?>
</p>
}
</body>
</html>