we made a php code
and im in php v2
but it seems the fsocket is not working
index.php
and this is the serverstatus.php
pls... help
all pages are correct
why it is not working well
its always says offline
but in *name of hosting company removed*
http://o2jam-r3.cjb.net/
its says online
pls.. help?
and im in php v2
but it seems the fsocket is not working
index.php
PHP:
<?php echo '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';?>
<head>
<title>O2Jam R3 - The Recollection of Music</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-style-type" content="text/css" />
<style type="text/css">
html{ font-size:11px; font-family: Tahoma; }
body{ background: #000; color: #ddd; }
a{ color: #a7a; }
a:hover{ text-decoration: none; }
p{ line-height: 10pt; margin:0px 5px 0px 10px; }
#page-wrapper {
border: 1px solid #E4E8EF;
margin: 0px;
text-align: center;
vertical-align: top;
width: 420px;
}
b.green { color: green; text-align: center; }
b.red { color: red; text-align: center; }
#header, #footer{
border: 1px solid #E4E8EF;
padding: 5px;
margin: 10px;
text-align: center;
vertical-align: bottom;
width: 420px
}
.header{
border-bottom: 2px dotted #494;
color: #FC0;
font-family: Arial;
font-size: 1.25em;
font-weight: bold;
margin: 8px;
padding: 8px;
text-align: center;
text-transform: uppercase;
}
.headerdesc{
line-height: 10pt;
margin: 8px;
padding: 8px;
text-align: center;
white-space: normal;
}
</style>
</head>
<body>
<div id="page-wrapper">
<table><tbody>
<tr><td id="header">
O2Jam R3 - The Recollection of Music<br/>
<?php
include 'serverstatus.php';
echo 'Game Server: ';
if($serverstatus == 1) { echo '<b class="green">Online</b>'; }
else { echo '<b class="red">Offline</b>';}
echo ' ';
echo 'Music Server: ';
if($ftptatus == 1) { echo '<b class="green">Online</b>'; }
else { echo '<b class="red">Offline</b>'; }
?>
</td></tr>
<tr><td>
<div class="header">:: 31 October 2008 ::</div>
<div class="headerdesc">
<p>Let's all get spooked on All Hollow's Eve. New notice page coming in a few days...</p>
</div>
<div class="header">:: 14 October 2008 ::</div>
<div class="headerdesc">
<p>New minor but important patch.
<br/>- Server IP Address Changed.
</p>
</div>
</td></tr>
<tr><td id="footer">
<p>© 2008 Chu Chin Kuan. All rights reserved.</p>
<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
<a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a>
</td></tr>
</tbody></table>
</div>
</body>
</html>
PHP:
<?php
$gameip = "o2jamr3.myftp.org";
$ftpip = "o2r3.servegame.com";
// Game Status Check
$timeout = 1;
if($myipc = @fsockopen($gameip, 15010, $errno, $errstr, $timeout)) {
$serverstatus = 1;
fclose($myipc); }
else{ $serverstatus = 0; }
// FTP Status Check
$timeout = 1;
if($myipc = @fsockopen($ftpip1, 21, $errno, $errstr, $timeout)) {
$ftpstatus = 1;
fclose($myipc); }
else{ $ftpstatus = 0; }
?>
all pages are correct
why it is not working well
its always says offline
but in *name of hosting company removed*
http://o2jam-r3.cjb.net/
its says online
pls.. help?
Last edited by a moderator: