ftp connection through C.

Discussion in 'C Programming' started by rkpopuri@gmail.com, Apr 2, 2008.

  1. Guest

    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.
     
    , Apr 2, 2008
    #1
    1. Advertising

  2. 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.
     
    Friedrich Dominicus, Apr 2, 2008
    #2
    1. Advertising

  3. In article <>,
    <> 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
     
    Walter Roberson, Apr 2, 2008
    #3
  4. 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 :)
     
    Antoninus Twink, Apr 2, 2008
    #4
  5. 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
     
    Walter Roberson, Apr 2, 2008
    #5
  6. 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.
     
    Antoninus Twink, Apr 2, 2008
    #6
  7. Guest

    On Apr 2, 1:29 pm, Antoninus Twink <> wrote:
    > 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.


    Please tell me the specific APIs in this context since I have to
    communicate basic functions like loading file from remote system.
     
    , Apr 2, 2008
    #7
  8. jacob navia Guest

    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
     
    jacob navia, Apr 2, 2008
    #8
  9. 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.
     
    Friedrich Dominicus, Apr 2, 2008
    #9
  10. Richard Guest

    Friedrich Dominicus <>
    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.
     
    Richard, Apr 2, 2008
    #10
  11. In article <ft07jl$v90$>,
    Richard <> wrote:
    ....
    >>> 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.
    >


    My esteemed colleague Mr. Twink is satirizing the regulars obsession
    with "We cannot talk about it unless you provide source". Which
    effectively makes anything that involves any 3rd party library OT.

    Which effectively makes it impossible to discuss anything the least bit
    non-trivial here.
     
    Kenny McCormack, Apr 2, 2008
    #11
  12. In article <fsvsjq$tqp$>, jacob navia <> wrote:
    > 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.


    Gee - is Jacob applying for Clique membership (i.e., moving towards the
    dark side) ?
     
    Kenny McCormack, Apr 2, 2008
    #12
  13. jacob navia Guest

    Kenny McCormack wrote:
    > In article <fsvsjq$tqp$>, jacob navia <> wrote:
    >> 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.

    >
    > Gee - is Jacob applying for Clique membership (i.e., moving towards the
    > dark side) ?
    >


    I had always a dark side
    :)

    Look Kenny, why should we do the work for this guy?

    Why is that "dark"?

    We helped him with suggestions, we named the library (libcurl) that
    solves his problems, and now he wants us to tell him exactly
    the API, the calling sequence, etc etc!!!!

    Why should we do that?


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Apr 2, 2008
    #13
  14. On 2 Apr 2008 at 12:02, jacob navia wrote:
    > 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.


    To be fair, libcurl is a pretty ferocious beast until you get used to
    it, even with the "simpler" API. The OP can surely find some basic
    tutorials using Google - and he can always ask again here if he has a
    specific question about the API.
     
    Antoninus Twink, Apr 2, 2008
    #14
  15. jacob navia Guest

    Antoninus Twink wrote:
    > On 2 Apr 2008 at 12:02, jacob navia wrote:
    >> 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.

    >
    > To be fair, libcurl is a pretty ferocious beast until you get used to
    > it, even with the "simpler" API. The OP can surely find some basic
    > tutorials using Google - and he can always ask again here if he has a
    > specific question about the API.
    >


    Well, yes, but what I feel is that at the end this
    group is there to:

    1) Do the homework of lazy students that find much easier to
    post "questions that are not homework" here.

    2) Do the work of programmers that get paid for doing nothing
    during the time that we work for them, gathering docs,
    learning how to use them etc.

    There are quite a few examples for libcurl once you google around.
    And, there are examples for the specific application the OP
    is asking for.


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Apr 2, 2008
    #15
  16. On 2 Apr 2008 at 22:24, jacob navia wrote:
    > Antoninus Twink wrote:
    >> On 2 Apr 2008 at 12:02, jacob navia wrote:
    >>> 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.

    >>
    >> To be fair, libcurl is a pretty ferocious beast until you get used to
    >> it, even with the "simpler" API. The OP can surely find some basic
    >> tutorials using Google - and he can always ask again here if he has a
    >> specific question about the API.
    >>

    >
    > Well, yes, but what I feel is that at the end this
    > group is there to:
    >
    > 1) Do the homework of lazy students that find much easier to
    > post "questions that are not homework" here.
    >
    > 2) Do the work of programmers that get paid for doing nothing
    > during the time that we work for them, gathering docs,
    > learning how to use them etc.
    >
    > There are quite a few examples for libcurl once you google around.
    > And, there are examples for the specific application the OP
    > is asking for.


    I don't believe we are in disagreement here.
     
    Antoninus Twink, Apr 2, 2008
    #16
  17. In article <ft0lj7$lsp$>, jacob navia <> wrote:
    >Kenny McCormack wrote:
    >> In article <fsvsjq$tqp$>, jacob navia <> wrote:
    >>> 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.

    >>
    >> Gee - is Jacob applying for Clique membership (i.e., moving towards the
    >> dark side) ?
    >>

    >
    >I had always a dark side
    >:)
    >
    >Look Kenny, why should we do the work for this guy?
    >
    >Why is that "dark"?


    I don't disagree with your intent. But I think many of us on the light
    side will agree that the "tone" was not unlike that taken by many of
    those on the dark side (aka, the "regulars").
     
    Kenny McCormack, Apr 3, 2008
    #17
  18. jacob navia Guest

    Kenny McCormack wrote:
    > In article <ft0lj7$lsp$>, jacob navia <> wrote:
    >> Kenny McCormack wrote:
    >>> In article <fsvsjq$tqp$>, jacob navia <> wrote:
    >>>> 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.
    >>> Gee - is Jacob applying for Clique membership (i.e., moving towards the
    >>> dark side) ?
    >>>

    >> I had always a dark side
    >> :)
    >>
    >> Look Kenny, why should we do the work for this guy?
    >>
    >> Why is that "dark"?

    >
    > I don't disagree with your intent. But I think many of us on the light
    > side will agree that the "tone" was not unlike that taken by many of
    > those on the dark side (aka, the "regulars").
    >


    The tone was not insulting! I just told him that he should
    do his job himself. That is not an insult as far as I can
    see.

    But maybe I am getting too sensible with my compiler system.
    Since I distribute the compiler for free, I receive all types
    of software requests. Since I work for free (people think)
    I should work for them for free, debug their programs, write
    sophisticated network analyzers, whatever!

    Just say NO.

    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Apr 3, 2008
    #18
  19. In article <ft34hg$mkv$>, jacob navia <> wrote:
    ....
    >> I don't disagree with your intent. But I think many of us on the light
    >> side will agree that the "tone" was not unlike that taken by many of
    >> those on the dark side (aka, the "regulars").
    >>

    >
    >The tone was not insulting! I just told him that he should
    >do his job himself. That is not an insult as far as I can
    >see.


    As I said, I don't disagree with your intent. I don't even disagree
    with your choosing to be a little snotty about it.

    I'm just sayin' that the style was that of the regulars (e.g., your
    buddy Heathfield) and it just struck me as being a little strange
    reading it with your name attached.

    It all would have been right in character coming from one of them...
     
    Kenny McCormack, Apr 3, 2008
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. someone

    FTP over SSL vs FTP over SSH

    someone, Apr 24, 2004, in forum: Java
    Replies:
    1
    Views:
    4,611
    iksrazal
    Apr 25, 2004
  2. Replies:
    3
    Views:
    5,704
  3. Nico Grubert
    Replies:
    0
    Views:
    658
    Nico Grubert
    Nov 24, 2005
  4. jakecjacobson

    FTP example going through a FTP Proxy

    jakecjacobson, Jan 7, 2009, in forum: Python
    Replies:
    3
    Views:
    2,116
    jakecjacobson
    Jan 8, 2009
  5. D. Buck
    Replies:
    2
    Views:
    530
    D. Buck
    Jun 29, 2004
Loading...

Share This Page