What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Now playing - XML Document

Now playing - XML Document
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Now playing - XML Document
Javascript code:
var url = 'http://69.175.111.66:8301/admin.cgi?mode=viewxml';
 
function GetXmlFromUrl () {
    Interop.Call('wininet.dll', 'DeleteUrlCacheEntryW', url);
    var xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
    xmlhttp.open('GET', url, true, 'user', 'pass');
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.responseCode == 200) {
                return xmlhttp.responseText;
            }
        }
    }
    xmlhttp.send();
}
 
function CreateXML() {
    try {
        var xml = new ActiveXObject("Microsoft.XMLDOM");
    } catch(e) { try {
        var xml = new ActiveXObject("MSXML2.DOMDocument");
    } catch(e) { return; } }
    xml.async = false;
    return xml;
}
 
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nType) {
    if(sMessage.toLowerCase() == '!current') {      
        var sXml = GetXmlFromUrl();
        var oXml = CreateXML();
        if (oXml !== false) {
            oXml.LoadXml(sXml);
            pChatWnd.SendMessage('Current playing '+oXml.selectSingleNode('//SHOUTCASTSERVER/SONGTITLE').text());
        }
    }
}

05-26-2010 12:59 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Now playing - XML Document - by carllawl on 05-25-2010 at 06:00 PM
RE: Now playing - XML Document - by carllawl on 05-25-2010 at 08:09 PM
RE: Now playing - XML Document - by matty on 05-26-2010 at 12:59 PM
RE: Now playing - XML Document - by carllawl on 05-26-2010 at 01:16 PM
RE: Now playing - XML Document - by matty on 05-26-2010 at 01:22 PM
RE: Now playing - XML Document - by carllawl on 05-26-2010 at 01:46 PM
RE: Now playing - XML Document - by matty on 05-26-2010 at 02:07 PM
RE: Now playing - XML Document - by carllawl on 05-26-2010 at 02:11 PM
RE: Now playing - XML Document - by matty on 05-27-2010 at 01:01 PM
RE: Now playing - XML Document - by carllawl on 05-27-2010 at 05:26 PM
RE: Now playing - XML Document - by carllawl on 05-31-2010 at 11:33 PM
RE: Now playing - XML Document - by matty on 06-01-2010 at 01:06 PM
RE: Now playing - XML Document - by carllawl on 06-04-2010 at 05:12 PM
RE: Now playing - XML Document - by carllawl on 06-12-2010 at 12:49 AM


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