How do I get PHP to mimic an XML when doing AJAX?

Steve

New member
I'm trying to make an AJAX page, but having a problem. See, I'm attempting to build the XML page using PHP, but not have to save a million XML files all over my webserver. So...

1. I don't want to save an XML file for every new login...
2. I want to make the XML render dynamically within a PHP page...
3. The only way to get the server to render the PHP page is by giving it the .PHP extension...
4. When I give it the .PHP extension, the XML script returns this error;
Warning: DOMDocument::load() [function.DOMDocument-load]: Start tag expected, '<' not found in /var/www/getxml.php

How do I get PHP to pretend to be an XML without giving me that error?
The problem with that error, if I had to guess, is that the PHP parser is not parsing the page before the XML reader gets to it, since they're both on the server. And since there's only one PHP tag, there are no XML tags. But this is for a login script. I can't build a new XML file for each login right? What if people close the browser instead of logging out? I can't delete their file then.
 
Back
Top