void searchChatLogs(char* searchString){
	char* baseURL = ;
	time_t t;
	struct tm* currentDate;
	char dateString[30],dateStringFile[30],lineData[MAX_LEN],targetURL[100];
	int i,flag;
	FILE *fp;

	CURL *curl;
	CURLcode res;

	time(&t);
	currentDate = localtime(&t);

	strftime(dateString, 30, , currentDate);
	printf(,dateString);

	if((curl = curl_easy_init())!=NULL){
		for(i=0;i<=10;i++){

		flag = 0;
		sprintf(targetURL,,baseURL,dateString);

		strcpy(dateStringFile,dateString);

		printf(,targetURL);

		if((fp = fopen(,))==0){
			printf(,targetURL);
		}
		else{
			curl_easy_setopt(curl, CURLOPT_URL, targetURL);
		curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);

		res = curl_easy_perform(curl);

		if(res == CURLE_OK){
			while(fgets(lineData,MAX_LEN,fp)!=NULL){
				if(strstr(lineData,searchString)!=NULL){
					flag = 1;
					fputs(lineData,stdout);
				}
			}

			if(flag==0)
				printf();
		}
		fflush(fp);
		fclose(fp);
		}

		currentDate->tm_mday--;
		mktime(currentDate);
		strftime(dateString, 30, , currentDate);	

	}
	curl_easy_cleanup(curl);

	}
}

int main(int argC,char* argV[])
{
	if(argC!=2)
		printf( if it contains spaces>",argV[0]);
	else
		searchChatLogs(argV[1]);
	return 0;
}