
The CGI-Forum
Here you can read all entries on the board and/or make own entries. Have fun!
a script for a picture change, its a little different then u might think, help me!!! - gerald petschl (geri@info.co.at), 23.8.97 - 17:30:23- its very simply
-
- crate an link in the folowing form
-
-
-
- and de program test.cgi contain the folowing funktion
-
- void CGI_GotoLocalPic(char *datei)
- {
- char *buffer;
- FILE *fp;
- int j;
-
- buffer=malloc(512*64);
- fputs('Content-type: image/gif\n\n',stdout);
- /* for jpg
- fputs('Content-type: image/jpg\n\n',stdout);
- */
- fp=fopen(datei,'rb');
- while (!feof(fp)) {
- j=fread(buffer,1,512*64,fp);
- fwrite(buffer,1,j,stdout);
- }
- fclose(fp);
- free(buffer);
- }
-
-
- ......
-
-
Script written by Wolfgang Wiese, feedback welcome.