PHP קוד:
function xmlhttpPost(strURL) {
var oXmlHttp = false;
var self = this;
if (window.oXmlHttpuest) {
self.oXmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
self.oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
self.oXmlHttp.open('GET', strURL, true);
self.oXmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.oXmlHttp.onreadystatechange = function() {
if (self.oXmlHttp.readyState == 4) {
fShowResult(self.oXmlHttp.responseText);
}
}
self.oXmlHttp.send();
}