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);
}
......


New MessageReply tn thisReply on topicDeleteOverviewPreviousNext Mail this Mail topic Mail all
New messageReply to this messageEntry to this topicDelete entryAll entries Previous Entry Next EntryMail this message Mail this topic Mail all messages

Script written by
Wolfgang Wiese, feedback welcome.