Thread: Accessing http in Linux using C?

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    26

    Accessing http in Linux using C?

    What I want to do in my program is download a file off the internet. I feel it's important that I write the code myself as a learning experience. So far I've looked at sockets and have read many times that it is for the low level stuff, not for what I want to do. Yet I keep looking around trying to figure out where to begin, and I can't find anything. Google is near useless when you don't know what you're looking for.

    Downloaded wget's source and quickly gave up on that - waaayyyy too much program to hack apart for what little I want to do.

    Any ideas where I should begin?

  2. #2
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    the best bet is to use wget's source get the oldest version you can find. It will be the best for learning off of. http://ftp.gnu.org/pub/gnu/wget/wget-1.5.3.tar.gz would be the best bet go into the src directory. If it is confusing to you then just study it more, there isn't that much code. Break it down into what you want and need.

  3. #3
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222
    http://www.w3.org/Protocols/rfc2616/rfc2616.txt

    check it out, it is the rfc on the latest version of http.

    http://www.faqs.org/rfcs/rfc1945.html

    is the older version of the protocol, and if you do a search on the later site you should be able to find the rfc for ftp.

    good luck
    "Assumptions are the mother of all **** ups!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting HTTP status of a site in C under Linux
    By anti4kd in forum C++ Programming
    Replies: 3
    Last Post: 01-03-2009, 01:56 PM
  2. Accessing TCP flags in TCP packets on Linux using C !!
    By vishamr in forum Linux Programming
    Replies: 2
    Last Post: 10-16-2006, 08:48 AM
  3. Accessing printer & touchscreen in Linux
    By g4j31a5 in forum C++ Programming
    Replies: 5
    Last Post: 08-08-2006, 02:04 AM
  4. installing linux for the first time
    By Micko in forum Tech Board
    Replies: 9
    Last Post: 12-06-2004, 05:15 AM