Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp using c

Status
Not open for further replies.

sramki

Programmer
May 8, 2001
27
0
0
IN
hey all

i would like to ftp a file to a web server .
i will get the web server name from the GUI screen i have and store it in a database .
From the database i shd fetch the path of the server and send a corresponding file to that server .

i need to just know abt the FTP part .how can i do it using C .
how do i initiate the ftp process and transfer the file using a c program .
iam using linux and c .
pl. help very urgent .
keep mailing
regards
ramki





 
You need to execute an external program (ftp directly, or a script executing it). You need the "exec" instructions. Try "man exec" on your shell and you'll see the exact syntax and so on.
 
I agree. The only two ways I can think of is to either write a script to deal with the logon name/password part, or create a pipe and run through it(works like system call) so you can login in that way. I think running an external cgi script is the easiest way to go.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top