- Code: Alles auswählen
- <?php
 # Server:Port
 $server="10.195.0.16:80";
 ?>
 <html>
 <head>
 <title>Server Status</title>
 <style type="text/css">
 <!--
 body {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 font-size: 8pt;
 text-decoration: none;
 margin-left: 0em;
 margin-top: 0em;
 vertical-align:middle
 }
 p {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 margin-left: 0.4em;
 margin-top: 0.4em;
 font-weight: 500;
 text-align: center;
 background: none;
 vertical-align:middle
 }
 p.titel {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 margin-left: 0.4em;
 margin-top: 0.4em;
 font-weight: 600;
 text-align: center;
 background: none;
 vertical-align:middle
 }
 a {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 }
 b.red {
 color: #ff0000;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 }
 b.green {
 color: #009900;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 
 }
 -->
 </style>
 <meta http-equiv="refresh" content="60">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body>
 <?php
 # Script
 $array = explode(":",$server);
 if (@fsockopen($array[0],$array[1],&$errno, &$errstr, 2))
 {
 echo "<p><b class=green>Online</b></p>";
 }else
 {
 echo "<p><b class=red>Offline</b></p>";
 }
 ?>
 </body>
 </html>
hier funktionierts und auf der website wird schön ONLINE in GRÜN dargestellt, mache ich das ganze nun mit der IP des STEAM SERVERS
- Code: Alles auswählen
- <?php
 # Server:Port
 $server="10.195.0.16:27015";
 ?>
 <html>
 <head>
 <title>Server Status</title>
 <style type="text/css">
 <!--
 body {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 font-size: 8pt;
 text-decoration: none;
 margin-left: 0em;
 margin-top: 0em;
 vertical-align:middle
 }
 p {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 margin-left: 0.4em;
 margin-top: 0.4em;
 font-weight: 500;
 text-align: center;
 background: none;
 vertical-align:middle
 }
 p.titel {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 margin-left: 0.4em;
 margin-top: 0.4em;
 font-weight: 600;
 text-align: center;
 background: none;
 vertical-align:middle
 }
 a {
 color: #ffffff;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 }
 b.red {
 color: #ff0000;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 }
 b.green {
 color: #009900;
 font-family: Verdana, sans-serif;
 text-decoration: none;
 font-size: 8pt;
 font-weight: 500;
 vertical-align:middle
 
 }
 -->
 </style>
 <meta http-equiv="refresh" content="60">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body>
 <?php
 # Script
 $array = explode(":",$server);
 if (@fsockopen($array[0],$array[1],&$errno, &$errstr, 2))
 {
 echo "<p><b class=green>Online</b></p>";
 }else
 {
 echo "<p><b class=red>Offline</b></p>";
 }
 ?>
 </body>
 </html>
steht immer nur OFFLINE da, auch wenn der server auf 10.195.0.16:27015 definitiv läuft...wo könnte hier der fehler liegen?





