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:
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
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Website Status - by smithygotlost on 08-19-2009 at 06:06 PM
RE: Website Status - by matty on 08-19-2009 at 07:19 PM
RE: Website Status - by smithygotlost on 08-20-2009 at 04: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