Probs something very easy but i don't know.
Here is the error:
Here are my files,Parse error: syntax error, unexpected $end in C:\wamp\www\MSC\status.php on line 44
status.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php include('core/init.inc.php'); ?> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Untitled 1</title> <style type="text/css"> table { width 600px; border-collapse: collapse; } td, th { padding: 4px; border: solid 1px #444; } .online { background: #090 } .offline { background: #900 } </style> </head> <body> <table> <thead> <tr> <th>server</th> <th>status</th> </tr> </thead> <tbody> <?php foreach ($servers as $server){ $online = server_online($server[0], $server[1]); ?> <tr> <td><?php echo $server[0], ':', $server[1]; ?></td> <td class=<?php echo($online) ? 'online' : 'offline' ?>> ><?php echo ($online) ? 'Online' : 'Offline'; ?></td> </tr> </tbody> </table> </body> </html>init.inc.php:
<?php $servers = array( array('83.222.240.254', '30465'), array('192.168.2.10', '25565'), ); error_reporting(0); $path = dirname(_FILE_); include("{$path}/lib/minecraft_server.inc.php"); ?>minecraft_server.inc.php:
<?php function server_online($server, $port){ fsockopen($server, $port, $errno, $errstr, 0.1); return($errno === 0); } ?>Thanks