Помогите с xmlhttprequest ???
Вот запрос на php файл:
var xmlhttp = getXmlHttp()
xmlhttp.open("POST", "хттп: //локалхост/index.php/get", true);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState != 4)
{
return
}
else
{
clearTimeout(timeout); // очистить таймаут при наступлении readyState 4
}
if (xmlhttp.status == 200)
{
// Все ок
alert(xmlhttp.responseText);
}
else
{
handleError(xmlhttp.statusText) // вызвать обработчик ошибки с текстом ответа
}
}
// Передача необходимых данных
xmlhttp.send("sender=user&recipient=admin");
// Таймаут 10 секунд
var timeout = setTimeout( function(){ xmlhttp.abort(); handleError("Time over") }, 700000);
function handleError(message) {
alert("Ошибка: "+message);
}
______________________________________
Как на нее ответить в php файле?