LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-08-2003, 03:47 PM   #1
KendersPlace
Member
 
Registered: Feb 2003
Location: Phoenix, AZ - USA
Distribution: RedHat 8, Micro$haft
Posts: 33

Rep: Reputation: 15
Simplified wget?


I've recently completed a C text book course and want to try my hand at some real, "usable" applications. Something I use quite a lot is 'wget' to grab image files from an art website at the local collage. As a fun project, I wanted to try to write my own, simplified version of the program, as a way to get my feet wet using network interfaces and something that actually "does" something useful over the web. The whole reason I learned C was to start writing my own applications that integrate with the network, but my C book never even scratched the surface of this.

So I got the wget source code to try to pick over it and understand it, but it is way more complicated than I expected. There are just soooo many options in the source code. I tried to isolate some of the key pieces of code that allow it to function, but was totally lost in all the extra code to implement all its extra functions. Wget is a fine application, and I don't intend to duplicate it by any means - I just want to create an app with similar functions as a learning excersise.

What I would like to start building is a simple app that uses http to grab a .gif or .jpg image by passing a url, and write that image to the drive. I'd be pretty happy with that for starters. Problem is, I have no idea how to start integrating a c program to use the network interface, possibly domain name lookups, using a specific port (80 or whatever) and so on.

Are there any good tutorials out there that would help me start to bridge the gap from simple file reads off the local disk drive and understand how to do the same sort of operation over a network or http?

We've all got to start someplace. Thanks for any help!!
 
Old 09-08-2003, 03:56 PM   #2
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
you want beej's socket programming guide, just google for beej and socket, it'll show up. if you dont know already you will also want to look into rfc2616(http)
 
Old 09-08-2003, 05:14 PM   #3
KendersPlace
Member
 
Registered: Feb 2003
Location: Phoenix, AZ - USA
Distribution: RedHat 8, Micro$haft
Posts: 33

Original Poster
Rep: Reputation: 15
kev82-

Thanks for the feedback. Just read over the intro for beej's tutorial, and looks like it's just what I need to get started. Looks like his writing style is interesting also.

I've seen the http standard before but it didn't make much sense. I'm sure I'll understand it more after reading the tut.

Thanks again.
 
Old 09-08-2003, 05:22 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
If you're getting stuck you can always look at the wget code and see how they did it.

Last edited by Proud; 09-08-2003 at 05:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simplified Samba for the likes of Me? mediocre_person Slackware 5 06-04-2004 10:47 AM
EN-Simplified CHinese on RedHat AS 2.1 cekcool Linux - Distributions 1 03-29-2004 12:38 AM
Nforce Ethernet on Mandrake 9.2 Simplified Steel Shepherd Mandriva 0 02-26-2004 11:59 PM
simplified linux teaching distro??? len Linux - Newbie 35 07-25-2003 11:02 PM
RPMs Simplified Chinese Maurice Arthur Linux - Software 1 01-18-2003 02:29 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration