hi all ~

Got a bit of a problem here, I'm writing a page (well, more like modifying 
some code I found ;) ) and the PHP sections appear to be ignored by both 
netscape and IE. I'm not sure if it's something with my code, or a lack of 
PHP exentions on the apache server that it will be placed on.
I'm copying the whole page worth of HTML into this doc (hope it isn't TO 
long.)
Also, for some reason, hotmail doesn't like "< or > or " " tags being copied 
from anyplace else, so I get thousands of "&al; or &gt; or &quot" ... sorry 
...
:-/

Any help would be wonderful! Thanks in advance all!

The code (the original, unedited version):
&lt;?php

error_reporting (E_ALL);

/* Allow the script to hang around waiting for connections. */

set_time_limit (0);

$telnetclient = &quot;zeth&quot;;
$remotehost[0] = &quot;abandonedrealms.net&quot;;
$remoteport[0] = &quot;9000&quot;;
$remotehost[1] = &quot;cnn.com&quot;;
$remoteport[1] = &quot;80&quot;;
$remotehost[2] = &quot;freebsd.org&quot;;
$remoteport[2] = &quot;80&quot;;

$c = count($remotehost);
$c2 = count($remoteport);
if($c != $c2){
    die(&quot;You must have both remoteport and remotehost specified for all 
servers.&quot;);
}

?&gt;

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Zeth's server status checker&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; 
charset=iso-8859-1&quot;&gt;
&lt;/head&gt;

&lt;body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;&gt;
&lt;table width=&quot;100&quot; border=&quot;1&quot; 
cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; 
bordercolor=&quot;#000000&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;table width=&quot;291&quot; border=&quot;0&quot; 
cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
        &lt;tr bgcolor=&quot;#00CCFF&quot;&gt;
          &lt;td&gt;&lt;b&gt;&lt;font color=&quot;#FFFFFF&quot; 
face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; 
size=&quot;2&quot;&gt;Server
            name&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
          &lt;td&gt;&lt;b&gt;&lt;font color=&quot;#FFFFFF&quot; 
face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; 
size=&quot;2&quot;&gt;Status&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;?php
for ($i = 0; $i &lt; $c; $i++) {
$fp = fsockopen(&quot;$remotehost[$i]&quot;, $remoteport[$i], $errno, 
$errstr);

if (!$fp) {
    ?&gt;
       &lt;tr bgcolor=&quot;#FFFFFF&quot;&gt;
          &lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana, 
Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;&lt;?php echo 
$remotehost[$i].&quot;:&quot;.$remoteport[$i]; ?&gt;&lt;/font&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;div align=&quot;center&quot;&gt;&lt;font 
color=&quot;#000000&quot; face=&quot;Verdana, Arial, Helvetica, 
sans-serif&quot; size=&quot;1&quot;&gt;DOWN&lt;/font&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
     &lt;?php
        } else {
     ?&gt;
       &lt;tr bgcolor=&quot;#FFFFFF&quot;&gt;
          &lt;td&gt;&lt;font color=&quot;#000000&quot; face=&quot;Verdana, 
Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;&gt;&lt;?php echo 
$remotehost[$i].&quot;:&quot;.$remoteport[$i]; ?&gt;&lt;/font&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;div align=&quot;center&quot;&gt;&lt;font 
color=&quot;#000000&quot; face=&quot;Verdana, Arial, Helvetica, 
sans-serif&quot; size=&quot;1&quot;&gt;UP&lt;/font&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
     &lt;?php
fclose ($fp);
}
}
        ?&gt;
      &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to