- Joined
- Oct 8, 2010
- Messages
- 332
- Reaction score
- 24
Hey RaGEZONER's,
I got a problem, more a suggestion with my PHP stat page.
I don't want that it says online/offline but that a picture will appear.
This script I use atm:
The images are located in:
site.com/images/offline.png
site.com/images/online.png
This stat is located in:
site.com/scripts/stats.php
So i think we have to use the:
../images/online.png
code but if I do that, errors appear.
Someone can help me out, I tried this in the first place:
//replaced the offline thing with this
The official IMG Scr is ../images/offline.png but in spoiler it shows up as forum.ragezone.com/images/offline.png so ye xD
Thanks if you can help me =)
I got a problem, more a suggestion with my PHP stat page.
I don't want that it says online/offline but that a picture will appear.
This script I use atm:
<?php
$srvip = "127.0.0.1"; //Input WanIP
$srvport = "6000"; //Port
$dns="GunzDB";
$user="SA";
$pass="******"; //Input Password Here
$connect=odbc_connect($dns, $user, $pass) or die ("Couldn't connect to the database, we're sorry...");
odbc_exec($connect,"use GunzDB");
?>
<tr>
<td align="right"></td>
<td><?php
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
} else {
echo "<font style='color: #009933'><B>Online</B></font></br>";
fclose($fp);
} ?></td>
</tr>
$srvip = "127.0.0.1"; //Input WanIP
$srvport = "6000"; //Port
$dns="GunzDB";
$user="SA";
$pass="******"; //Input Password Here
$connect=odbc_connect($dns, $user, $pass) or die ("Couldn't connect to the database, we're sorry...");
odbc_exec($connect,"use GunzDB");
?>
<tr>
<td align="right"></td>
<td><?php
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
} else {
echo "<font style='color: #009933'><B>Online</B></font></br>";
fclose($fp);
} ?></td>
</tr>
The images are located in:
site.com/images/offline.png
site.com/images/online.png
This stat is located in:
site.com/scripts/stats.php
So i think we have to use the:
../images/online.png
code but if I do that, errors appear.
Someone can help me out, I tried this in the first place:
//replaced the offline thing with this
echo "<font style='color: #FF3300'><B><html><head><body><img src="/images/offline.png" alt="" /></body></head></html></B></font></br>";
The official IMG Scr is ../images/offline.png but in spoiler it shows up as forum.ragezone.com/images/offline.png so ye xD
Thanks if you can help me =)
Last edited: