ok ik op google een site gevonden en daar de hele forum doorgezocht en uiteindelijk ben ik dit php script tegen gekomen:
<?php
//you can change these so they link to any image you want

$live = "YOURONLINEIMAGE";
$dead = "YOUROFFLINEIMAGE";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 90;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>Then put
Code:
<img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">On your site
Here is how to work the PHP one:
1. Make a file called green.gif and change
'$live = "YOURONLINEIMAGE";' to '$live = "http://yourdomain.com/green.gif";'
2. Make a file called red.gif and change
'$live = "YOURONLINEIMAGE";' to
'$dead = "http://yourdomain.com/red.gif";'
3. Upload
4. Make a PHP File with a name like "status.php"
5. Put the PHP Code into the PHP file
6. Open the
http://yourdomain.com/status.php
7. Enter your IP where it says "YOURIPHERE
8. Upload
9. Put the:
<img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
onto a page where you want the server status to appear
(like on your homepage or loader page)
10. Start your server
11. See if it works
ik heb de 2 plaatjes geupload 1 waar online op staat en 1 waar offline op staat de php code is nu zo geworden.
<!--p
//you can change these so they link to any image you want

$live = "http://powerhotel.woelmuis.nl/tobar1.gif";
$dead = "http://powerhotel.woelmuis.nl/tobar2.gif";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 1232;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
-->
ok ik heb het getest en in me webpagina gezet.
HTML:
<img src="http://www.powerhotel.woelmuis.nl/status.php?link=84.30.xx.xx:1232">
aleen er komt niet het plaatje online terwijl me server online staat :S
er komt het plaatje offline en ik zie daar boven bij addres dan de link van dat plaatje staan
ik hoop dat jullie me kunnen helpen