Thread: Advice on research on downloading files useing C

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    2

    Advice on research on downloading files useing C

    Hello, I been looking around the internet trying to find help on how to download a file from a server useing a program written C. I have managed to do this in Java, but I have no idea how to do it in C, and I cant seem to find anything on the net. I do not want to be told how to do it, thanks but could anyone pass on some links or search terms I should be putting into google to help my research?

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    56
    Help others help you..

    What type of server are you trying to retrieve the file from? What operating system are you working with?

    -----------

    Look into networking APIs.

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    2
    Quote Originally Posted by scoobasean
    Help others help you..

    What type of server are you trying to retrieve the file from? What operating system are you working with?

    -----------

    Look into networking APIs.
    sorry (Is it too obvious I learnt Java first?) I'm working on Unix, and when you ask 'what type of server' I think I'm meant to answer http? I'm meant to type in a url and then the program gets the file from the site.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well there are several ways of doing this, depending on how much work you're prepared (or want) to do yourself.

    For example, you could have something really simple which just drives a program like your ftp client. Or maybe a little more complex would be to use an interface provided by a library such as libcurl.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    you might want to have a look at an app like wget for an example.
    http://www.gnu.org/software/wget/wget.html

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    If you are prepared to do everything yourself learn socket programming and read the http rfc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Downloading HTML Files from Web Page
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 07-18-2002, 05:59 AM
  2. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 09:15 AM
  3. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM
  4. displaying text files, wierd thing :(
    By Gades in forum C Programming
    Replies: 2
    Last Post: 11-20-2001, 05:18 PM
  5. Need Advice in reading files
    By jon in forum C Programming
    Replies: 4
    Last Post: 10-07-2001, 07:27 AM