[HELP] Serveronlinestatus mit Bild

10/23/2010 17:20 Ide.#1
DEU

Moin Jungs, kurze Frage.

Mache grad nen Serveronline Status selbst.
Ich bin jetzt soweit das er den Status als Online oder Offline angibt, aber halt nur als Wort.
Anstatt dem Wort möchte ich jetzt Bilder einfügen, aber wie?
Ich hab schon viel ausprobiert, bekomem aber nicht hin. :/

ENG

Hey Guys, i've a little Question

I work now at a "Serveronline Status" on my own.
I have wirte the php code to show me the Words Online and Offline.
Now i want to show to differents Images. I have try many idea's but nothing work.

PHP Code:
<td><div align="center">
              <?php 
        
if(@fsockopen("***.23.6.183",11002,&$errno,&$errstr,2)){ 
        echo 
"<b><font color=\"green\">Online</font></b>"
        } 
        else{ 
        echo 
"<b><font color=\"red\">Offline</font></b>";    
        } 
        
?>
            </div></td>
DEU

Ich hatte es mir so gedacht:

ENG

I've hope it work with this php code:

PHP Code:
</div></td>
            <td><div align="center">        <?php 
        
if(@fsockopen("217.23.6.183",13000,&$errno,&$errstr,2)){ 
        echo 
"<b><img src="on.gif" /></b>"
        } 
        else{ 
        echo 
"<b><img src="off.gif" /></b></b>";    
        } 
        
?></div></td>
DEU

Funktioniert aber nicht. :<
Ich hoffe ihr könnt mir hier helfen!

ENG

But it didnt work. :<
I hope you can help me with my Problem.

Best Regards,
Ide.
10/26/2010 11:49 sava#2
Moin

Das ist deins:
PHP Code:
</div></td>
            <td><div align="center">        <?php 
        
if(@fsockopen("217.23.6.183",13000,&$errno,&$errstr,2)){ 
        echo 
"<b><img src="on.gif" /></b>"
        } 
        else{ 
        echo 
"<b><img src="off.gif" /></b></b>";    
        } 
        
?></div></td>
und das hat nur einen kleinen Fehler =)

PHP Code:
</div></td>
            <td><div align="center">        <?php 
        
if(@fsockopen("217.23.6.183",13000,&$errno,&$errstr,2)){ 
        echo 
'<b><img src="on.gif" /></b>'
        } 
        else{ 
        echo 
'<b><img src="off.gif" /></b></b>';    
        } 
        
?></div></td>
So funktioniert es ;)

Mfg