Hi,
I have this script that I made and it works great with IE but when I try FF, the page does not render. It shows the HTML source. The HTML source is valid other that the use of the ‘<font>’ tag. I use this tag because I am not sure how to accomplish what I am doing any other way. See code. If there is another way to do this without rewriting the entire script I would like to know.
[code=php]<?PHP
include (“irlp_script.php”);
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>I.R.L.P. Status</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta HTTP-EQUIV=”Pragma” CONTENT=”no-cache”>
</head>
<body bgcolor=”#003573″ text=”#c1c1c1″>
<center>
I.R.L.P. Node Status<br>
<font color=”<? echo $color ?>”>
<? echo $text ?>
</font>
</center>
</body>
</html>
This next code is what is included.
[code=php]<?PHP
header(‘Content-Type: text/plain’);
// Opens the file.
$handle = fopen(‘http://status.irlp.net/nohtmlstatus.txt’ , “r”);
// Function that looks through the file for the node number.
while(!feof($handle)) {
$buffer = fgets($handle, 4096);
$pos = strpos($buffer, ‘5010’);
if ($pos !== FALSE && $pos == ‘0’)
break;
}
// Closes the file.
fclose($handle);
// Sorts the gathered data.
$buf_arr = explode(“t”, $buffer);
// Assigns the status of the node.
$irlp = $buf_arr[‘5’];
// Assigns the node owners callsign.
$owner = $buf_arr[‘1’];
// KD7BCS Node 5010.
$status = ($owner . ‘ Node 5010’ );
// Lets user know nothing was found for the node.
if($irlp == null) {
$text = (‘Sorry, there was no data found for Node 5010.’);
}
// KD7BCS Node 5010 is Idle.
elseif($irlp == ‘IDLE’) {
$text = ($status . ‘ is ‘ . $irlp);
}
// KD7BCS Node 5010 is Offline.
elseif($irlp == ‘OFFLINE’) {
$text = ($status . ‘ is ‘ . $irlp);
}
// KD7BCS Node 5010 is Down.
elseif($irlp == ‘DOWN’) {
$text = ($status . ‘ is ‘ . $irlp);
}
// KD7BCS Node 5010 is Busy.
elseif($irlp == ‘BUSY’) {
$text = ($status . ‘ is ‘ . $irlp);
}
// KD7BCS Node 5010 is connected to Node 7160.
elseif($irlp < ‘9000’) {
$text = ($status . ‘ is connected to Node ‘ . $irlp);
}
// KD7BCS Node 5010 is connected to Reflecter 9453.
elseif($irlp > ‘8999’) {
$text = ($status . ‘ is connected to Reflecter ‘ . $irlp);
}
// This section assigns the color of the text based on what data was retrieved.
if($irlp == null) {
$color = ‘#33CCFF’;
}
elseif($irlp == ‘IDLE’) {
$color = ‘#00FF00’;
}
elseif($irlp == ‘OFFLINE’) {
$color = ‘#FF0000’;
}
elseif($irlp == ‘BUSY’) {
$color = ‘#FF0000’;
}
elseif($irlp == ‘DOWN’) {
$color = ‘#FF0000’;
}
elseif($irlp < ‘9000’) {
$color = ‘#FF0000’;
}
elseif($irlp > ‘8999’) {
$color = ‘#FFFF00’;
}
?>
Any help would be appriciated