APPENDICES SECTION APPENDIX C

unescape_url(paramv);

paramn = (char *)makeword(paramv, '='); to_upper(paramn);

if (strcmp(paramn, "IP") == 0) strcpy(szIP, paramv);

else if (strcmp(paramn, "URL") == 0) strcpy(szURL, paramv);

else if (strcmp(paramn, "CAT") == 0) strcpy(szCategory, paramv);

else if (strcmp(paramn, "USER") == 0) strcpy(szUserName, paramv);

getnextquery(¶mv);

}

free(paramd);

}

else

{

/*==================================================== Read stdin and convert form data into an array; set

a variety of global variables to be used by other areas of the program

====================================================*/

data_size = atoi(getenv("CONTENT_LENGTH")); for(index = 0; data_size && (!feof(stdin)); index++)

{

entries[index].val = (char *)fmakeword(stdin, '&', &data_size);

plustospace(entries[index].val); unescape_url(entries[index].val); entries[index].name = (char

*)makeword(entries[index].val, '=');

if (strcmp(entries[index].name, "IP") == 0) strcpy(szIP, entries[index].val);

else if (strcmp(entries[index].name, "URL") == 0) strcpy(szURL, entries[index].val);

else if (strcmp(entries[index].name, "CAT") == 0) strcpy(szCategory, entries[index].val);

else if (strcmp(entries[index].name, "USER") == 0) strcpy(szUserName, entries[index].val);

}

}

printhtml();

}

void printhtml()

418

8E6 TECHNOLOGIES, PROXYBLOCKER USER GUIDE

Page 432
Image 432
8e6 Technologies ProxyBlocker manual Entriesindex.val = char *fmakewordstdin, &, &datasize