#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<stdlib.h>
#include<string.h>

    
    int main ()
    {
      FILE *fp;
      char s[300] , ptr[20]; 	     
	system("rm *.html* ");
      system("wget http://www.cs.rmit.edu./students/ ");    
	system("mv index.html First.html");
	system("sleep 10");
	system("wget http://www.cs.rmit.edu./students/ "); 
      system("diff First.html index.html > difference.txt" );
	fp=fopen("difference.txt","r");
      if(fgets(ptr,30,fp))
	     {
	     system( "mailx -s   \"Changes were detected \"    < difference.txt ");
           }
    else 
	      printf(" were  changes detected"); 
	     
            return 0;   
      

     }
      
      
   



