This browser has requested the Accept: application/xhtml+xml,text/html;q=0.9,text/plain; mime types.
The same PHP file contains genuine XML code, HTML4 code and WAP/WML code and exports the page relevant to what the browser will accept.
Unless the browser explicitly accepts the WAP/WML mime type, the file checks for IE using the user agent. If this has been altered or if it does not match IE, HTML4 is output instead of XML.
The actual text of each page is entered as PHP variables to prevent duplication. One section of the PHP file contains all the variables and their text. Subsequent code then decides on the format of the page and then outputs the text using that format.