Hello everybody,
I am looking for similar script. I created a new script with your these codes;
code:
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://test.com/sendtophp.com", true);
send(null);
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
// Multi-conversations won't work yet.
if(email == ChatWnd.Contacts[0].Email)
{
SendToPHP(email, Message);
}
}
I don't want to create a white list or black list. I want to send all data to php. But when someone sends me a message, this script gives an error in debugging window:
Script is now loaded and ready
Function called: OnEvent_ChatWndReceiveMessage
Error: 'email' is undefined (code: -2146823279)
File: msn.js. Line: 17.
Function OnEvent_ChatWndReceiveMessage returned an error. Code: -2147352567
Can anybody help me?