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.