

             
	     


#include<stdio.h>
#include<stdlib.h>
#include<string.h>

    
    int  ()
    {
       char url[30];
       int exitValue=-1;
       FILE *fr;

       char s[300]; 	     
	system("rm index.html*");
        system("wget http://www.cs.rmit.edu./students/ ");    
	 system("mv index.html one.html");
	 
           printf("System completed Writing\n"); 
	   system("sleep 3600");
	    
	    
            system("wget http://www.cs.rmit.edu./students/ "); 
            
	          
	    	     
	     exitValue=system("diff one.html index.html > .out" );
	     
             fr=fopen(".out","r");
	     
	     strcpy(s,"mailx -s \"Testing Again\"");
	     	     
	     strcat(s,"  < .out");
	     if(fgets(url,30,fr))
	     {
	     system(s);
	     
	     system("rm one.html");  
	     
	     printf("\nCheck your mail") ; 
	     fclose(fr);        
	     }
	       else
	           {
	            printf(" changes detected"); 
		    
	            system("rm one.html"); 
		    fclose(fr);   
		   }
		   return 0;   
      }
      
      
   




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


int main()
{

  system("wget -p --convert-links http://www.cs.rmit.edu./students/");
  system("mkdir home");
  system("mv www.cs.rmit.edu./images/*.*   home/");
  system("mv www.cs.rmit.edu./students/*.* home/");
  system("cd www.cs.rmit.edu./images");
  sleep(1);
  system("wget -p --convert-links http://www.cs.rmit.edu./students/");
  system("mkdir second");
  system("mv www.cs.rmit.edu./images/*.*  second/");
  system("mv www.cs.rmit.edu./students/*.* second/");
  system("cd www.cs.rmit.edu./images");
  system("diff home second > difference.txt");
  system("mailx -s   \"Difference in  \"    < difference.txt ");
  return 0;
}
