si, lo script lato server va bene
da javascript lo ottieni sempre nel modo di prima
codice:
function getServerDate() {
if (typeof XMLHttpRequest != "undefined") {
xhr = new XMLHttpRequest();
}
else {
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
xhr = null;
}
}
}
if (xhr != null) {
xhr.open("GET", "nomescript_data.php", false);
xhr.send(null);
if ((xhr.status == 200) || ((xhr.status == 304))) {
return xhr.responseText;
}
}
return "";
}
alert(getServerDate());