Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

File uploads with C and CGI

Name: Anonymous 2011-08-23 17:32

Hey /prog/, is it possible to handle file uploads through CGI with C without using the cgic lib? I'm doing a project that will be run on a different computer with almost no set up time so I'd like to keep all the libs standard.

Name: Anonymous 2011-08-23 18:01

fagtard

Name: Anonymous 2011-08-23 18:11

That's a job for perl5, not C

Name: Anonymous 2011-08-23 18:20

Well, I'm stuck with C for now. Actually coding it on windows but I have to get it to run in Linux.

Name: Anonymous 2011-08-23 18:27

You're not making any sense yet.

Name: Anonymous 2011-08-23 18:45

My project is to make a webpage with CGI and C that will accept a user uploaded .csv file (which is just text) and parse it into an SQL database. The parsing and the SQL, I can do. I just need to get the file to the program. I've been able to get other form data through the POST method but I can't get to the file.

Name: Anonymous 2011-08-23 18:49

>>6
Read standard input.

Name: Anonymous 2011-08-23 19:31

>>7
Well, I'll be damned. Turns out I should've been using fread instead of fgets. It would only read the initial garbage so I thought it wasn't working.

Well, thanks anyway.

Name: Anonymous 2011-08-23 20:43


#!/bin/sh
cat > filename.cvs


You can thank me later.

Don't change these.
Name: Email:
Entire Thread Thread List