2014-12-23, 11:59 PM
Yes, I wanna fit in this code into the header template:
So how to do this? I tried add it to the header template but seems like the PHP aren't working there?
<?php
function check($server,$port=8585,$timeout=3) {
$PingIT = fsockopen($server, $port, $timeout);
if ( ! $PingIT ) {
return FALSE;
} else {
return TRUE; }}
$server = '109.234.77.20';
$status = check($server);
if( $status ) {
$Result1 = "<font color='green'>online</font>";
} else {
$Result1 = "<font color='red'>offline</font>"; }
?>
<center><?php echo "MapleStory "; ?> is <?php echo $Result1;?></center>
So how to do this? I tried add it to the header template but seems like the PHP aren't working there?