Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > ftp connection through C.

Reply
Thread Tools

ftp connection through C.

 
 
rkpopuri@gmail.com
Guest
Posts: n/a
 
      04-02-2008

I want to connect to ftp server and automatically It should be running
as background process.
And Please tell me how to proceed. I have a webinterface which will
take the inputs "username" "password"
"Ipaddr" and "reomte file name containg its path". Now Want I need is
I should be able to access that file and get it.

 
Reply With Quote
 
 
 
 
Friedrich Dominicus
Guest
Posts: n/a
 
      04-02-2008
writes:

> I want to connect to ftp server and automatically It should be running
> as background process.
> And Please tell me how to proceed. I have a webinterface which will
> take the inputs "username" "password"
> "Ipaddr" and "reomte file name containg its path". Now Want I need is
> I should be able to access that file and get it.

check out decent library for that. I'd suggest having a look at
libcurl

Regards
Friedrich


--
Please remove just-for-news- to reply via e-mail.
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      04-02-2008
In article <4cd3c199-f3cb-4640-bd4a->,
<> wrote:

>I want to connect to ftp server and automatically It should be running
>as background process.
>And Please tell me how to proceed.


The C language predates TCP/IP by about a decade.

>I have a webinterface which will


The C language predates web interfaces by about 25 years.

>take the inputs "username" "password"
>"Ipaddr" and "reomte file name containg its path". Now Want I need is
>I should be able to access that file and get it.


You will have to use platform-specific methods to do any networking.
None of the C standards support any kind of networking (at all, in any
form.) You might be able to find a more-or-less portable third-party
non-standard library that handles all of the systems that you are
interested in having your code run on. Or you might not. Ask in
newsgroups that deal with development on the platforms you are
interested in.
--
"The quirks and arbitrariness we observe force us to the
conclusion that ours is not the only universe." -- Walter Kistler
 
Reply With Quote
 
Antoninus Twink
Guest
Posts: n/a
 
      04-02-2008
On 2 Apr 2008 at 5:24, Friedrich Dominicus wrote:
> writes:
>
>> I want to connect to ftp server and automatically It should be running
>> as background process.
>> And Please tell me how to proceed. I have a webinterface which will
>> take the inputs "username" "password"
>> "Ipaddr" and "reomte file name containg its path". Now Want I need is
>> I should be able to access that file and get it.

> check out decent library for that. I'd suggest having a look at
> libcurl


libcurl will certainly do what you want, but be aware that it's an
extremely powerful (and therefore extremely large and complex) library.

If you just want a basic ftp library (which is what it sounds like), and
aren't worried about clever stuff like multiple connections or being
able to use other protocols besides ftp, then ftplib will probably be
more suitable.

Alternatively, the ftp protocol isn't really that complicated - you
could have fun writing your own implementation just using the standard
networking functions for your system

 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      04-02-2008
In article <>,
Antoninus Twink <> wrote:
>On 2 Apr 2008 at 5:24, Friedrich Dominicus wrote:
>> writes:
>>
>>> I want to connect to ftp server and automatically It should be running
>>> as background process.
>>> And Please tell me how to proceed. I have a webinterface which will
>>> take the inputs "username" "password"
>>> "Ipaddr" and "reomte file name containg its path". Now Want I need is
>>> I should be able to access that file and get it.

>> check out decent library for that. I'd suggest having a look at
>> libcurl


>libcurl will certainly do what you want, but be aware that it's an
>extremely powerful (and therefore extremely large and complex) library.


>If you just want a basic ftp library (which is what it sounds like), and
>aren't worried about clever stuff like multiple connections or being
>able to use other protocols besides ftp, then ftplib will probably be
>more suitable.


Note though that the OP is going through a web interface with
username and password. That implies that one of the HTTP
authentication mechanisms is possibly in use; at the very least,
an HTTP FORM is in use. If, that is, the original poster was
accurate in saying "a webinterface" and it isn't just FTP -type
prompts.
--
"And that's the way it is." -- Walter Cronkite
 
Reply With Quote
 
Antoninus Twink
Guest
Posts: n/a
 
      04-02-2008
On 2 Apr 2008 at 7:50, Walter Roberson wrote:
> In article <>,
> Antoninus Twink <> wrote:
>>On 2 Apr 2008 at 5:24, Friedrich Dominicus wrote:
>>> writes:
>>>
>>>> I want to connect to ftp server and automatically It should be running
>>>> as background process.
>>>> And Please tell me how to proceed. I have a webinterface which will
>>>> take the inputs "username" "password"
>>>> "Ipaddr" and "reomte file name containg its path". Now Want I need is
>>>> I should be able to access that file and get it.
>>> check out decent library for that. I'd suggest having a look at
>>> libcurl

>
>>libcurl will certainly do what you want, but be aware that it's an
>>extremely powerful (and therefore extremely large and complex) library.

>
>>If you just want a basic ftp library (which is what it sounds like), and
>>aren't worried about clever stuff like multiple connections or being
>>able to use other protocols besides ftp, then ftplib will probably be
>>more suitable.

>
> Note though that the OP is going through a web interface with
> username and password. That implies that one of the HTTP
> authentication mechanisms is possibly in use; at the very least,
> an HTTP FORM is in use. If, that is, the original poster was
> accurate in saying "a webinterface" and it isn't just FTP -type
> prompts.


I'd assumed the OP was writing something like a cgi program, so that the
information supplied on the web form was somehow passed to the OP's
program as arguments or environment variables - of course if the OP is
implementing an HTTP transfer in his program as well, then libcurl would
be a good choice.

 
Reply With Quote
 
rkpopuri@gmail.com
Guest
Posts: n/a
 
      04-02-2008
On Apr 2, 1:29 pm, Antoninus Twink <nos...@nospam.invalid> wrote:
> On 2 Apr 2008 at 7:50, Walter Roberson wrote:
>
>
>
> > In article <slrnfv6e88.22m.nos...@nospam.invalid>,
> > Antoninus Twink <nos...@nospam.invalid> wrote:
> >>On 2 Apr 2008 at 5:24, Friedrich Dominicus wrote:
> >>> rkpop...@gmail.com writes:

>
> >>>> I want to connect to ftp server and automatically It should be running
> >>>> as background process.
> >>>> And Please tell me how to proceed. I have a webinterface which will
> >>>> take the inputs "username" "password"
> >>>> "Ipaddr" and "reomte file name containg its path". Now Want I need is
> >>>> I should be able to access that file and get it.
> >>> check out decent library for that. I'd suggest having a look at
> >>> libcurl

>
> >>libcurl will certainly do what you want, but be aware that it's an
> >>extremely powerful (and therefore extremely large and complex) library.

>
> >>If you just want a basic ftp library (which is what it sounds like), and
> >>aren't worried about clever stuff like multiple connections or being
> >>able to use other protocols besides ftp, then ftplib will probably be
> >>more suitable.

>
> > Note though that the OP is going through a web interface with
> > username and password. That implies that one of the HTTP
> > authentication mechanisms is possibly in use; at the very least,
> > an HTTP FORM is in use. If, that is, the original poster was
> > accurate in saying "a webinterface" and it isn't just FTP -type
> > prompts.

>
> I'd assumed the OP was writing something like a cgi program, so that the
> information supplied on the web form was somehow passed to the OP's
> program as arguments or environment variables - of course if the OP is
> implementing an HTTP transfer in his program as well, then libcurl would
> be a good choice.


Please tell me the specific APIs in this context since I have to
communicate basic functions like loading file from remote system.
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      04-02-2008
wrote:
>
> Please tell me the specific APIs in this context since I have to
> communicate basic functions like loading file from remote system.



I do not see why we should do your job for you.

It is *your* job to load a file from the remote system,
not ours. We can give you hints as to what to use,
but do not expect that we work for you for free. Sorry.

You download libcurl, you read the docs, you find the
API, you use it.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
 
Reply With Quote
 
Friedrich Dominicus
Guest
Posts: n/a
 
      04-02-2008
Antoninus Twink <> writes:

>
> libcurl will certainly do what you want, but be aware that it's an
> extremely powerful (and therefore extremely large and complex)
> library.

With all respect but the easy_curl interface is as the name suggest
easy.
>
> Alternatively, the ftp protocol isn't really that complicated - you
> could have fun writing your own implementation just using the standard
> networking functions for your system

I can not see the fun in re-implementing something (with high
likliness much worse) than relying on time proved libraries. So I
disagree

Regards
Friedrich



--
Please remove just-for-news- to reply via e-mail.
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      04-02-2008
Friedrich Dominicus <just-for-news->
writes:

> Antoninus Twink <> writes:
>
>>
>> libcurl will certainly do what you want, but be aware that it's an
>> extremely powerful (and therefore extremely large and complex)
> > library.

> With all respect but the easy_curl interface is as the name suggest
> easy.
>>
>> Alternatively, the ftp protocol isn't really that complicated - you
>> could have fun writing your own implementation just using the standard
>> networking functions for your system

> I can not see the fun in re-implementing something (with high
> likliness much worse) than relying on time proved libraries. So I
> disagree
>
> Regards
> Friedrich


Which part of "fun" confused you? Would you also outlaw all "write a
telephone database" courses in the first year at Uni? it#s called
learning by doing.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP example going through a FTP Proxy jakecjacobson Python 3 01-08-2009 04:44 PM
sun.net.ftp.FtpProtocolException: Error reading FTP pending reply long990802@gmail.com Java 3 12-11-2005 02:46 AM
Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server. D. Buck Perl Misc 2 06-29-2004 02:05 PM
FTP over SSL vs FTP over SSH someone Java 1 04-25-2004 03:30 PM
no ftp connection possible through cisco router with ip inspect Didier Cisco 0 01-27-2004 03:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57