void find_keyword() { int len=0; int lenkey=0; int key_no=0; char teststr[50]; while((ip.keyfound==0) &&(key_no!=MAX_KEY)) { // getting the length of the keyword lenkey=strlen(keys[key_no].getword()); char *ptr=NULL; ptr=strstr(ip.userip,keys[key_no].getword()); if (ptr!=NULL) { // keyword found ! ip.keyfound=1; ip.keyno=key_no; strcpy(ip.keyword,keys[key_no].getword()); break; } key_no++; } }