

#include "stdio.h"
#include "stdlib.h"


int getDifference()
{
	system("wget http://www.cs.rmit.edu./students/");
	return system("diff index.html index.html.1");
}


int sendMail()
{
	int ret;
	printf("\n Program has Detected a Change  the webpage, a mail has been send    yallara .\n");
	ret = system("diff index.html index.html.1 | mail @cs.rmit.edu.");
	sleep(1000);
	system("clear");
}

void clean()
{
	system("rm index.htm*.*");
}
()
{
	while(1){

	int ret = 0;
	ret = getDifference();
	if(ret>0)
	{
	sendMail();
	}
else
	{
	printf("\n  is  difference in the web \n");
	}
	clean();
	printf("Checking the  every 24 hrs..");

	sleep(86400000);
	}
}



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

#define SUCCESS 0;

int ()
{	
	
	system("rm index.*");	
	system("wget --non-verbose http://www.cs.rmit.edu./students");
	system("sleep 10");
	system("wget --non-verbose http://www.cs.rmit.edu./students");		
	system("diff index.html index.html.1 >> output.txt");
	printf("Comparison stored in output.txt");
	system("mutt -a output.txt @cs.rmit.edu. ");
	
	return SUCCESS;
}
