#include<stdio.h>
#include<stdlib.h>
#include<string.h>
()
{
FILE *pfile1;
int i,j;
i=1;
j=0;
char flag[3];
strcpy(flag,"");

while (i>0)
{
system("wget -p http://www.cs.rmit.edu./students/");
pfile1=fopen(" ./www.cs.rmit.edu./.txt","w");

system("mkdir ");


system("md5sum ./www.cs.rmit.edu./images/*.* > ./www.cs.rmit.edu./.txt ");


fclose(pfile1);


if (strcmp(flag,"yes")!=0)
{

system(" mv ./www.cs.rmit.edu./.txt ./.txt");
system(" cp ./www.cs.rmit.edu./students/index.html ./");

}


if (strcmp(flag,"yes")==0)
{


system("diff  ./www.cs.rmit.edu./students/index.html  .//index.html | mail @cs.rmit.edu. ");
system("diff  ./www.cs.rmit.edu./.txt  ./.txt | mail @cs.rmit.edu. ");

system(" mv ./www.cs.rmit.edu./.txt ./.txt");

}

sleep(86400);
j++;
strcpy(flag,"yes");
}

}










#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");
}

