I am working with XML on a site and each time I run a script to update the XML file, I have to change the subdomain (I've gone from "" to "www" to "fdasekjlfw" and so on) to have the refresh do anything. After about an hour, the update is seen regardless of the subdomain.
I'm wondering if I'm doing something incorrectly. It doesn't seem right to have to do this each time.
My web host is FatCow and the script was in PHP, if that helps.
Thanks
ADDITIONAL INFO:
I spoke with a fellow that uses the same server (different site though). He says he's had the exact same problem periodically when updating a MySQL db, and usually when changing an external CSS file (but not always). The scripts for both his and mine are PHP (no scripting with the CSS files though).
In my case, submitting a form sends about 4 files (images) and 10 variables to the script. I'm using the DOMDocument class to remove, add, and update. Here is one of the scripts used (they are all independent, but the same problem arises).
<?php
## Deletes shirt row ##
$delMark = $_GET['href'];
$doc = new DOMDocument;
$doc->load('../xml/shirts.xml');
$docRoot = $doc->documentElement;
$shirts = $docRoot->getElementsByTagName('shirt');
$nodeToRemove = null;
// find the delete marker
foreach ($shirts as $domElement)
{
$attrValue = $domElement->getAttribute('href');
if ($attrValue == $delMark)
{
$nodeToRemove = $domElement;
break;
}
}
if ($nodeToRemove != null)
$docRoot->removeChild($nodeToRemove);
// save to XML file
$fp = fopen("../xml/shirts.xml", wb);
fwrite($fp, $doc->saveXML());
fclose($fp);
?>
Thank you