[Share] Graphic status script L2J 

Status
Not open for further replies.
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
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:
Download of script with images:

status - [Share] Graphic status script - RaGEZONE Forums


the images don't appear transparent in IE because a error, but in firefox is work 100%
 
Last edited:
nice dude thanks for all ur help... ill try to do both this one and the other cool stutus thing u posted :).... just one quick question.... were do i put the block.php? and does the code have to be put into the same site as the block.php?
 
Link's ON

nice dude .. really nice !!
I'll use it
 
cant download images =S
and i have a little problem =S

Parse error: parse error, unexpected '*' in W:\www\block.php on line 46
 
Doesn't work. Keeps telling me my game server and login is down. I added all the needed files into my ftp this is what it looks like:

" $loginIP = "24.30.98.157";
$gameIP = "24.30.98.157";
// Edit Ports if needed or add more
$loginPORT= "2106";
$gamePORT= "7777"; "

rest is at default.

 
plz try to fixing error of internet explorer couse i realy need to use this script its awsome
 
Grigoryan said:
Doesn't work. Keeps telling me my game server and login is down. I added all the needed files into my ftp this is what it looks like:

" $loginIP = "24.30.98.157";
$gameIP = "24.30.98.157";
// Edit Ports if needed or add more
$loginPORT= "2106";
$gamePORT= "7777"; "

rest is at default.


any solution?
 
Status
Not open for further replies.
Back