Weird... see how it lost its color scheme. Now I think it is back.
I cleard PostPrep and pasted the UDF again and now pasting here again to test. Now the space is back again.
;Function WebsiteStatus($ChkString, $url, $Email) ; ;Author Ron Lewis/NTDOC (ntdoc@kixhelp.com) ; ;Action Checks to verify a website is up and running ; ;Syntax WebsiteStatus("string to check for", "URL of website to check", "your email address don't forget to doubl e the @@ signs") ; ;Date 2003-FEB-17, updated 2003-FEB-17 ; ;Version 1.02 ; ;Update Changes Changed the object to "microsoft.xmlhttp" and implemented with ARGUMENTS ; ;Remarks Not tested, but I think if it acts like browser, if site is down you get different page.. so should email you. ; ;Dependencies NT/2000/XP - Not tested or designed for Windows 9x ; KiXtart Ver 4.12 or newer, Outlook (not Express) ; Requires IE 5.0 or newer ; ;Example wkix32.exe geturl.kix /i ; BREAK On ; WHILE @ERROR = 0 ; WebsiteStatus("KiXHelp.com", "http://www.kixhelp.com/", "john.doe@@my.company.com") ; SLEEP 300 ; LOOP ; ;Code
Function WebsiteStatus($ChkString, $url, $Email) $HTTP = CreateObject("microsoft.xmlhttp") $HTTP.Open("GET", $url, NOT) $HTTP.Send $SiteStatus=($HTTP.ResponseText) IF NOT INSTR($SiteStatus, $ChkString) $Root = CreateObject("Outlook.Application") $MailItem = $Root.CreateItem( 0 ) $MailItem.Importance=2 $MailItem.Subject = "Website Status" $MailItem.To = $Email $MailItem.Body = "The website $url appears to be down at @DATE @TIME" $MailItem.Send $Root="" ENDIF EndFunction
|