$data
";
break;
case "DATE":
echo "$data";
break;
case
"BODY":
echo " $data
";
break;
default:
break;
}
}
// initialize parser
$xml_parser= xml_parser_create();
// set callback functions
xml_set_element_handler($xml_parser,"startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
// open XML file
if (!($fp = fopen($file, "r")))
{
die("Cannot locate XML data file: $file");
}
// read and parse data
while ($data = fread($fp, 4096))
{
// error handler
if (!xml_parse($xml_parser, $data, feof($fp)))
{
die(sprintf("XML error: %s at line %d",xml_error_string(xml_get_error_code($xml_parser)),xml_get_current_line_number($xml_parser)));
}
}
// clean up
xml_parser_free($xml_parser);
?>
Description
The Reader is a program that connects to the C4 server and retrieves current news and announcements.
The postings are sorted and displayed in order by date.
This program will run minimized in your system tray. In order to view the current news,
double-click on the "c4" icon in the system tray. The program connects to the server once every hour
to check for any new postings. If a connection cannot be established, a cached version of the news
will be displayed. If there is a new posting created on the C4 website, the program will pop-up
an alert window with a link to the C4 website.
Download Program
Place it in a local directory on your hard drive.
If you wish to run this program on start-up, create a shortcut to the executable file, and place it into your StartUp folder.
For Windows XP and 2000 users:
The StartUp folder is located in "C:\Documents and Settings\User Name\Start Menu\Programs\"
Download C4 News and Announcements Reader: C4News.exe
Prerequisites:
In order to use the Reader, you must have .NET Framework 1.1 installed on your computer.
To install .Net Framework, download and run this setup file: Dotnetfx.exe