Set the Content-type
header to text/xml
and have your PHP script generate XML just as it would generate any other content. You may want to consider using caching though, so you don't overwhelm the server by accident.
↧
Answer by Ignacio Vazquez-Abrams for Can PHP be used inside an XML file?
↧