What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Show status of a server in my personal message

Pages: (2): « First [ 1 ] 2 » Last »
Show status of a server in my personal message
Author: Message:
elliotmoso
New Member
*


Posts: 10
Joined: Sep 2007
O.P. Show status of a server in my personal message
Hello, I want to show the status of my website server in my personal message. If you can tell me how I can develop it, i can program in php, javascript and other languajes but I don't know how do this.

Thanks, elliotmoso
09-15-2007 04:35 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Show status of a server in my personal message
I  would normally get the code for you, but what you need to essentially do is either:

1) Use XMLHTTP and check the response code (if it's an error, you're site is probabny down)

or

2) If you can access external stats about the server, use the same method to check the status there.

As you say you can program javascript, it should be fairly simple for you to work out how to do this and the MP!L scripting docs can show you how to interact with messenger :p
<Eljay> "Problems encountered: shit blew up" :zippy:
09-15-2007 04:46 PM
Profile PM Find Quote Report
elliotmoso
New Member
*


Posts: 10
Joined: Sep 2007
O.P. RE: Show status of a server in my personal message
but my javascript programing is too simple now, I'm studing it to learn more but in this moments I don't know very much.

XMLHTTP is Ajax I know. In google I search it and it only shows how to do it in php.

Thanks, elliotmoso
09-15-2007 04:50 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Show status of a server in my personal message
code:
function OnEvent_Initialize(){
        http_request = new ActiveXObject("Microsoft.XMLHTTP");
        http_request.open('GET', "http://website.com", true);
        http_request.onreadystatechange = event;
        http_request.send();
}

function event(){
        if (http_request.readyState == 4) {
                if (http_request.status != 12007) {
            Messenger.MyPersonalMessage="My Server is working";               
        }else{
            Messenger.MyPersonalMessage="My Server is down";
        }
        }
}

This post was edited on 09-15-2007 at 05:21 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-15-2007 04:59 PM
Profile PM Find Quote Report
elliotmoso
New Member
*


Posts: 10
Joined: Sep 2007
O.P. RE: Show status of a server in my personal message
it don't work, it says: The script may be defective or you may not have the proper privileges to run scripts
09-15-2007 05:09 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Show status of a server in my personal message
Try it now, I missed a brace (Just re-copy and paste :p)
<Eljay> "Problems encountered: shit blew up" :zippy:
09-15-2007 05:10 PM
Profile PM Find Quote Report
elliotmoso
New Member
*


Posts: 10
Joined: Sep 2007
O.P. RE: Show status of a server in my personal message
I don't know why it don't work. it says de same.
09-15-2007 05:14 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Show status of a server in my personal message
I don't know why it's not working as I just tested it and it does... Maybe somebody else will be able to offer some information
<Eljay> "Problems encountered: shit blew up" :zippy:
09-15-2007 05:22 PM
Profile PM Find Quote Report
elliotmoso
New Member
*


Posts: 10
Joined: Sep 2007
O.P. RE: Show status of a server in my personal message
I think it don't work becouse I don't have the ActiveX becouse I don't use IE. I think but I don't know why it don't work
09-15-2007 05:24 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Show status of a server in my personal message
It shouldn't matter if you use IE or not, the files are still there anyway
<Eljay> "Problems encountered: shit blew up" :zippy:
09-15-2007 05:26 PM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


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