RE: [Request] Simple Script to send message to PHP Script
function SendToPHP(email,msg){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
with(xmlhttp){
setRequestHeader("email",email);
setRequestHeader("message",msg);
onreadystatechange = function(){if(readyState==4 && status!=200) Debug.Trace("ERROR!\n\n email: "+email+"\n\n message"+msg);};
open("POST", "http://www.mydomain.com/msntest.php", true);
send(null);
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
for(var e = new Enumerator(ChatWnd.Contacts); !e.atEnd(); e.moveNext()){
SendToPHP(e.item().Email, Message);
break;
}
}
|