What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Website Status

Website Status
Author: Message:
smithygotlost
New Member
*


Posts: 2
Joined: Aug 2009
O.P. Website Status
I was looking at making something that would change my personal message to say, Site has no problems, site offline ect by pinging it. so if it pinged google and it replide Google In Running With No Problems, If google doesnt reply Google is Currently Experiencing Problems


Would something like this be possible and can anyone advise anything

Thanks
Mike
08-19-2009 06:06 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Website Status
Something like this is the easiest way :)

Javascript code:
CheckWebsiteStatus ( 'google.ca' );
 
function CheckWebsiteStatus ( sUrl ) {
    var xmlhttp = new ActiveXObject( 'Microsoft.XMLHTTP' );
    xmlhttp.open ( 'GET', 'http://downforeveryoneorjustme.com/'+sUrl+'&'+new Date ( ).getTime ( ), true );
 
    xmlhttp.onreadystatechange=function ( ) {
        if ( xmlhttp.readyState === 4 && xmlhttp.status === 200 ) {
            var resText = xmlhttp.responseText.toLowerCase();
            if ( resText.substr ( 0 , 3 ) === 'huh' ) {
                Debug.Trace ( 'Website does not exist on the interwho' );
            } else if ( resText.substr ( 0 , 13 ) === 'it\'s just you' ) {
                Debug.Trace ( 'Website is up' );
            } else if ( resText.substr ( 0 , 17 ) === 'it\'s not just you' ) {
                Debug.Trace ( 'Website is down' );
            }
        }
    }
    xmlhttp.send ( '' );
}


And there is a much better way of doing this I am just too lazy to do it.

This post was edited on 08-19-2009 at 07:19 PM by matty.
08-19-2009 07:19 PM
Profile E-Mail PM Find Quote Report
smithygotlost
New Member
*


Posts: 2
Joined: Aug 2009
O.P. RE: Website Status
hmmm i wish i could understand these things :P

how would i compile that ?

or even make it work ?

i really need to learn this :P

Thanks
Mike
08-20-2009 04:46 PM
Profile E-Mail PM Find Quote Report
« 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