Código PHP:
   function XMLHTTPOBJ ()
{
 return (typeof(XMLHttpRequest) != 'undefined') ? new XMLHttpRequest() : (typeof(ActiveXObject) != 'undefined' ? new ActiveXObject('Microsoft.XMLHTTP') : false);
}
 
function XMLHTTPOBJ ()
{
 try {
  xmlhttpojb = new ActiveXObject("Msxml2.XMLHTTP");
 }
 catch (e) {
  try {
   xmlhttpojb = new ActiveXObject("Microsoft.XMLHTTP");
  }
  catch (E){
   xmlhttpojb = false;
  }
 }
 if (!xmlhttpojb && typeof XMLHttpRequest != 'undefined')
 {
  xmlhttpojb = new XMLHttpRequest();
 }
 return xmlhttpojb;
} 
    
 
