What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Simple Script to send message to PHP Script

Pages: (2): « First « 1 [ 2 ] Last »
1 votes - 5 average   [Request] Simple Script to send message to PHP Script
Author: Message:
Richy
Junior Member
**

Avatar

Posts: 16
36 / Male / Flag
Joined: Feb 2008
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;
}
}
03-15-2008 08:43 AM
Profile E-Mail PM Find Quote Report
Richy
Junior Member
**

Avatar

Posts: 16
36 / Male / Flag
Joined: Feb 2008
RE: [Request] Simple Script to send message to PHP Script
I can't understand. Why doesn't this script run?
03-19-2008 04:19 PM
Profile E-Mail PM Find Quote Report
yenerich
New Member
*


Posts: 2
Joined: Apr 2008
RE: RE: [Request] Simple Script to send message to PHP Script
quote:
Originally posted by Richy
I can't understand. Why doesn't this script run?

function SendToPHP(user,msg){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
with(xmlhttp){
setRequestHeader("user",user);
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){
SendToPHP(Origin, Message);
}

This could help to just send the user taht sent the message and the message itself.
04-04-2008 10:12 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On