What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » send messages to a server

send messages to a server
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: send messages to a server
Well, if you want to send a request to a PHP file using GET- or POST-statements and receive the returned data, you can use the XMLHTTP ActiveX object. An example code would be:
code:
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
//Replace"POST" by "GET" if you want to use GET-statements
//Enter your URL in the 2nd parameter
xmlhttp.open("POST", "http://www.mysite.com/myscriptpage.php", true);
//Remove the following line if you want to use GET instead of POST.
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//Enter the statements which have to be sent, separated by a &-sign.
//Ex: a=5&b=myscript
xmlhttp.send("a=5&b=myscript");
xmlhttp.onreadystatechange = function() {
  if(xmlhttp.readyState==4) {
    if(xmlhttp.status == 200){
      //It worked, we have a response!
      Debug("Yay! Success! Here's the returned HTML:");
      Debug.Trace(html.responseText);
    }else{
      //Hmm... something went wrong here...
      Debug.Trace("Mayday, Mayday, we have an XMLHTTP error!");
    }
  }
}

Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-20-2007 09:03 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
send messages to a server - by ab5000 on 02-19-2007 at 08:24 PM
RE: send messages to a server - by Evertje on 02-19-2007 at 11:13 PM
RE: send messages to a server - by Matti on 02-20-2007 at 09:03 AM
RE: send messages to a server - by Volv on 02-20-2007 at 09:24 AM
RE: send messages to a server - by ab5000 on 02-20-2007 at 07:03 PM


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