What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] display alexa rank from my site in personal message

[Request] display alexa rank from my site in personal message
Author: Message:
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: [Request] display alexa rank from my site in personal message
Here's a quick script that should do the job:
code:
var PSM = "Alexa Rank: %alexa%";
var URL = "www.google.com";

function OnEvent_Initialize(MessengerStart) {
    if (Messenger.MyStatus > 0) {
        MsgPlus.AddTimer("UpdateTimer", 1800000);
        UpdateAlexaRankPSM();
    }
}

function OnEvent_Timer(TimerId) {
    MsgPlus.AddTimer("UpdateTimer", 1800000);
    UpdateAlexaRankPSM();
}

function UpdateAlexaRankPSM() {
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.open("GET", "http://xml.alexa.com/data?cli=9&dat=nsa&url=" + encodeURI(URL), true);
    xmlhttp.send();
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            Messenger.MyPersonalMessage = PSM.replace(/%alexa%/g, xmlhttp.responseText.match(/^145 (\d+)$/m)[1]);
        }
    }
}
This will update your PSM with your site's Alexa Rank every 30 minutes. Just change the highlighted red text to your own custom PSM (where "%alexa%" will display your site's ranking) and your website's URL.
09-22-2007 08:11 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] display alexa rank from my site in personal message - by ezak on 09-20-2007 at 08:47 PM
RE: [Request] display alexa rank from my site in personal message - by phalanxii on 09-22-2007 at 08:11 AM
RE: [Request] display alexa rank from my site in personal message - by ezak on 09-22-2007 at 02:43 PM
RE: [Request] display alexa rank from my site in personal message - by Matti on 09-22-2007 at 04:15 PM
RE: [Request] display alexa rank from my site in personal message - by ezak on 09-22-2007 at 04:31 PM
RE: [Request] display alexa rank from my site in personal message - by Matti on 09-22-2007 at 04:44 PM
RE: [Request] display alexa rank from my site in personal message - by phalanxii on 09-23-2007 at 12:56 AM
RE: [Request] display alexa rank from my site in personal message - by ezak on 09-24-2007 at 01:46 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