This is a PHP script that parses the Nagios status.dat file into an array, and then outputs that array as XML. There is also a PHP module written in C to do the same task, and based on the same code.