Junior Spellweaver
- Joined
- Dec 29, 2004
- Messages
- 149
- Reaction score
- 0
they asked me to demonstrate how make a status script with images, and here is it!!
Create block.php
edit the bold lines as you want.
i test in free host provides and not working because they block fsockopen function, then i make iframe of it.
On your Website, where you want it, put:
example of custom status:
Download of script with images:
the images don't appear transparent in IE because a error, but in firefox is work 100%
Create block.php
Code:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>L2 status</title>
<?
// Edit IPs below
[b]$loginIP = "localhost";
$gameIP = "localhost";
$gameIP1 = "localhost";[/b]
// Edit Ports if needed or add more
[b]$loginPORT= "2106";
$gamePORT= "7777";
$gamePORT1= "7778";[/b]
?>
<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
body {
margin-left: 0px;
margin-top: 0px;
}
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; }
.style6 {font-size: 12px; font-weight: bold; }
-->
</style>
</head>
<body>
<table width="191" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="28" colspan="2" background="livestatus.png"><span class="style1"></span></td>
</tr>
<tr>
<td colspan="2"><span class="style1"></span></td>
</tr>
<tr>
<td width="89"><div align="right" class="style5">
<div align="right">Login:</div>
</div></td>
<td width="102"><div align="center" class="style6"><span class="style1">
<? error_reporting(0); $flogin = fsockopen ("$loginIP",$loginPORT, $errno, $errstr, 0);
if ($flogin)
{
print "<img src='offline.jpg'>";}
else
{ print "<img src='online.jpg'>";}?>
</span></div></td>
</tr>
<tr>
<td><div align="right" class="style5">
<div align="right">Gtest1:</div>
</div></td>
<td><div align="center" class="style6"><span class="style1">
<? error_reporting(0); $fgame = fsockopen ("$gameIP",$gamePORT, $errno, $errstr, 0);
if ($fgame){print "<img src='offline.jpg'>";}
else {print "<img src='online.jpg'>";}
?>
</span></div></td>
</tr>
<tr>
<td><div align="right" class="style5">
<div align="right">Gtest2:</div>
</div></td>
<td><div align="center" class="style6"><span class="style1">
<? error_reporting(0); $fgame = fsockopen ("$gameIP1",$gamePORT1, $errno, $errstr, 0);
if ($fgame){print "<img src='testing.png'>";}
else {print "<img src='online.jpg'>";}
?>
</span></div></td>
</tr>
<tr>
<td colspan="2"><span class="style1"></span></td>
</tr>
</table>
</body>
</html>
edit the bold lines as you want.
i test in free host provides and not working because they block fsockopen function, then i make iframe of it.
On your Website, where you want it, put:
Code:
<iframe allowtransparency="1" frameborder="0" height="140" name="status" src="block.php" marginwidth="10" width="191"></iframe>
example of custom status:
To view the content, you need to sign in or register
Download of script with images:
To view the content, you need to sign in or register
the images don't appear transparent in IE because a error, but in firefox is work 100%
Last edited:

