parseLocationFile($nodeLocation->read()); // Let's try to read the node status file $nodeStatus = new FileHandler($config['node_status_file'], 'r'); $kmlFile->parseStatusFile($nodeStatus->read()); // Write the file to the server $file = new FileHandler($config['root'] . '/kml/nodemap-' . $time . '.kml', 'w'); $file->write($kmlFile->toString()); } header('Location: kml/nodemap-' . $time . '.kml'); ?>