Site hosted by Angelfire.com: Build your free website today!

siys guestbook





Thanx for visiting. please read the comments:



# GUESTBOOK.C #include < stdio.h> #include < stdlib.h> #include < time.h> #define MAX_ENTRIES 10000 typedef struct { char *name; char *val; } entry; char *makeword(char *line, char stop); char *fmakeword(FILE *f, char stop, int *len); char x2c(char *what); void unescape_url(char *url); #void plustospace(char *str); main(int argc, char *argv[]) { entry entries[MAX_ENTRIES]; register int x,m=0; int cl; time_t Ourtime; FILE *fp, *fopen(); fp = fopen("../htdocs/Admin/gbook.html","a"); printf("Content-type: text/html%c%c",10,10); cl = atoi(getenv("CONTENT_LENGTH")); for(x=0;cl && (!feof(stdin));x++) { m=x; entries[x].val = fmakeword(stdin,'&',&cl); plustospace(entries[x].val); unescape_url(entries[x].val); entries[x].name = makeword(entries[x].val,'='); } Ourtime = time(NULL); printf("< center> < H1> Thank You for Signing our guestbook! < /H1> < /center> "); printf("< hr size=10> < FONT SIZE=+1>

"); printf("Your Name Here< /a> < i> yourid@ whatever.net< /i> < /address> < /FONT> "); fputs("< b> ",fp); fputs(ctime(&Ourtime),fp); fputs("< /b> < i> < a href=mailto:",fp); fputs(entries[0].val,fp); fputs("> < /i> < b> ",fp); fputs(entries[1].val,fp); fputs("< /b> < /a> ",fp); fputs(entries[2].val,fp); fputs("\n< hr> ",fp); fclose(fp); }



to siys home page

Email: stevaum@aol.com