Quantcast
Channel: The Bit Cruncher
Viewing all articles
Browse latest Browse all 88

Monitor single Website

$
0
0
$webClient = new-object System.Net.WebClient
$webClient.Headers.Add("user-agent", "PowerShell Script")

while (1 -eq 1) {
   $output = ""

   $startTime = get-date
   $output = $webClient.DownloadString("your website")
   $endTime = get-date

   if ($output -like "*your website*") {
      "Success`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"
   } else {
      "Fail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"
   }

   sleep(300)
}

Viewing all articles
Browse latest Browse all 88

Trending Articles