#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#define TRUE 0
()
{
FILE *fp;
system("rmdir ./www.cs.rmit.edu.");
char chk[1];
strcpy(chk,"n");
  while(1)
  {
       
   	system("wget -p http://www.cs.rmit.edu./students/");
		
		system("md5sum ./www.cs.rmit.edu./images/*.* > ./www.cs.rmit.edu./text1.txt");
		
		
		if (strcmp(chk,"n")==0)		
		{		
		system("mv ./www.cs.rmit.edu./text1.txt   ./text2.txt");
		system("mkdir ./");
		
		system("mv ./www.cs.rmit.edu./students/index.html ./");
		}
		else
		{
		
		
		system(" diff ./www.cs.rmit.edu./students/index.html .//index.html | mail @cs.rmit.edu. ");
		system(" diff ./www.cs.rmit.edu./text1.txt ./text2.txt | mail @cs.rmit.edu. ");
		system("mv ./www.cs.rmit.edu./students/index.html ./");
		system("mv ./www.cs.rmit.edu./text1.txt   ./text2.txt");				
		}
		sleep(86400);
		strcpy(chk,"y");
		
	}
}		    	      
      
      










#include<stdio.h>
#include<strings.h>
#include<sys/time.h>
#include<stdlib.h>

#define MINUTE 45

int main()
{
  system("rm index.html");
  system("wget http://www.cs.rmit.edu./students/");
  sleep(MINUTE);
  system("mv index.html first.html");
  system("wget http://www.cs.rmit.edu./students/");
  system("sdiff first.html index.html > report.html");
  FILE* fp = fopen("report.html","r");
  if (fp != NULL)
   {
     printf("Please  the changes in your mail");
     system("mailx -s \"WatchDog \"  < report.html");
    }
  system("rm first.html");
}

