I wrote a script which adds a element to an xml file with attributes added using the php5 DOM objects.
PHP Code:
$xml_dom = new DOMDocument();                                // Load DOM Object
$xml_dom -> load("db.xml");                                    // Load xml databse into the object

$newsletter_log $xml_dom -> getElementsByTagName('newsletter_log')->item(0);    // Asign the element to a vaible
$newElement $xml_dom -> createElement('log');                // Create a new elemnt and asign to varible
$newsletter_log -> appendChild($newElement);                // Apend the new element node into the parent element
$newElement -> setAttribute('action'$act);                // Setting new atriubts to the element
$newElement -> setAttribute('email'$_GET["email"]);
$newElement -> setAttribute('time/date'date("H:i d.m.y"));
$newElement -> setAttribute('recommended',$recommended);
$xml_dom -> save("db.xml");                                    // Save new XML docmument 
However, I have just been notified that the script will run in a php4 environment, which I have no experience of, especially in using the old DOM extensions. I know that DOM is not always turned on with php4, how can I find this out (I have access to a phpinfo file)? Also, how can I modify the script to work with php4?