Shoutbox

[REQUEST] Retrieving info from MSN Groups - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [REQUEST] Retrieving info from MSN Groups (/showthread.php?tid=68756)

[REQUEST] Retrieving info from MSN Groups by TPCDel on 11-22-2006 at 04:27 PM

Hello.

I have a small request.

I own an MSN Group, and have recently hit 40,000 members... I placed "Current members (40000)" in my MSN name, and then thought about keeping it in there.

I was wondering if there is a way that can automatically update every hour (or so?).

I understand this is asking alot. I have the coding to get the data if this helps. I just wouldn't know how to get that into my MSN name.


code:
alias members { sockopen members groups.msn.com 80 | .timerclose 1 20 sockclose members }
on *:sockopen:members:{
  sockwrite -n $sockname GET / $+ %chan $+ /_members.msnw?action=member_admin&type=MEM HTTP/1.1 $+ $crlf $+ User-Agent: Vincula/ $+ $vver (compatible; MSIE 6.0; Windows NT 5.1) $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: EN-US
  sockwrite -n $sockname Host: groups.msn.com $+ $crlf $+ Cookie: AdultWarn=1;path=/;chocx=9,02,0310,2401; MSPProf= $+ %msnpp.profile $+ ; MSPAuth= $+ %msnpp.ticket $+ ; $+ $crlf $+ Connection: Close $+ $crlf $+ $crlf
}
on *:sockread:members:{
  if ($sockerr) {
    halt
  }
  else {
    var %memb
    sockread %memb
    if (Current members $chr(40) isin %memb) { $message  $htmlfree(%memb) }
  }
}
I'm not sure if that is much help, but someone said it may come in handy.
Thank you for your time.

RE: [REQUEST] Retrieving info from MSN Groups by Ezra on 11-22-2006 at 04:47 PM

I'll try to whip something up.

EDIT: I'm having a little trouble with the ajax request not sure what I did wrong, but I can't get a response :S


RE: [REQUEST] Retrieving info from MSN Groups by TPCDel on 11-22-2006 at 05:49 PM

Oh OK

I dont really know what that means, The code I showed was taking from a mIRC script addon where someone would type !members in the chatroom an dit would tell us the members.

Also you need to be a member of the group to view how many members, im not sure how would you make that connect with the group name, perhaps use the current email and view it via that way.


RE: [REQUEST] Retrieving info from MSN Groups by Ezra on 11-22-2006 at 05:59 PM

This is how I did it:

code:
function groups(sGroup)
{
  ajax.open("GET","http://groups.msn.com/" + sGroup + "/_members.msnw?action=member_admin&type=MEM", true, username, password);
    ajax.onreadystatechange = getmembers;
    ajax.send(null);
}

function getmembers()
{
  if (ajax.readyState == 4)
    {
        var strGroups = ajax.responseText;
        //var strMembers = strGroups.match(/Current\smembers\s\(([0-9]+)\)/i);
    var strMembers = strGroups.match(/Huidige\sleden\s\(([0-9]+)\)/i);
    Debug.Trace("strGroups: " + strGroups);
    //Debug.Trace("strMembers: " + strMembers[1]);
        if (strMembers != null)
        {
            Messenger.MyName = strMembers[1];
        }
        else
        {
      MsgPlus.DisplayToast("MsnGroups Members", "Failed to update name");
    }
  }
}

And that has worked perfectly well on other websites, but it won't give a response :S
RE: [REQUEST] Retrieving info from MSN Groups by TPCDel on 11-22-2006 at 06:02 PM

Hmmm.. Well as I say you need to be a member of the group to view how many members. So perhaps if you included the passport im logged in with, so it checks if its a member and views it that way?

I know im asking alot.

Edit: Do you want my MSN group link?


RE: [REQUEST] Retrieving info from MSN Groups by Ezra on 11-22-2006 at 06:12 PM

Nah, that's ok, i'm using my group to test, but I don't think I can log in with xmlhttprequest.

Or someone else would know a way?


RE: [REQUEST] Retrieving info from MSN Groups by TPCDel on 11-22-2006 at 06:16 PM

Oh OK

So do we wait? :\


RE: [REQUEST] Retrieving info from MSN Groups by Plik on 11-22-2006 at 07:04 PM

quote:
Originally posted by Ezra
Nah, that's ok, i'm using my group to test, but I don't think I can log in with xmlhttprequest.

Or someone else would know a way?
You should be able to send a cookies header in the request. But getting the cookie value would envolve either the user inputing their cookie data, or some dummy form submission with the request object.

And perhaps the problem with your request is "/_members.msnw?action=member_admin&type=MEM"
RE: [REQUEST] Retrieving info from MSN Groups by TPCDel on 11-22-2006 at 07:14 PM

Ohhhhh well spotted, sorry.

Heres the link

http://groups.msn.com/" + sGroup + "/_members.msnw?action=member_list&type=MEM


RE: [REQUEST] Retrieving info from MSN Groups by TPCDel on 11-24-2006 at 03:43 PM

Does anyone have any idea how?