C Programming in Linux Tutorial #098 – A Simple Web Server Program

C Programming in Linux Tutorial using GCC compiler. Tutorial should also be applicable in C/UNIX programming. This video shows an example on how create a simple webserver program in C. The webpage is embedded into the C program, as well as the name of the image files. However, these can be modified to have more flexibility, such that the filenames and webpage are not embedded into the program.

Comments

Shahnur Isgandarli says:

Hello. Thanks for a great video! How can I get the source code?

JAGANNATH SAHOO says:

It my case it exits after first client….it not running 2nd time…can you help?

A Cat says:

Tip: set speed at 1.5x

fahad alhagbani says:

God bless you and bless you daughter.

Hyunseok Jeong says:

Pretty Daughter. :-)
Thanks for all your videos.
I just finished to following your video. :-)

MrGarrowson says:

I did everything the sam,e and the function sendfile is not defined, here are my imports:
#include
#include
#include
#include
#include

#include

#include

#include
#include
#include
#include

I had to add #include
Even after that I can’t see the images on the webpage, just the icon for image not found

Kranti Madineni says:

I liked all your videos but this, libusb and segmentation fault videos are the ones which i liked the most…Your child also very cute…Thank you very much for your effort to teach others…

Oumarou Annicet nebie says:

THANK YOU

Mazhar Imam Khan says:

char webpage[] = “HTTP/1.1 200 OKrn”
“Content-Type: text/html; charset=UTF-8rnrn”
“< !DOCTYPE html>rn”
web-serverrn”
..
..
..
What this that thing used for ?
I am a beginner, can you please explain what this program does ? what are you trying to show through this code ?

Anis Skramz says:

what if i want to make it in audio format like .mp3? @shellwavex

tmstani23 says:

This is brilliant. Thank you!

Alex Kurucz says:

Thank you so much. I’ve typed in every program and watched each video twice. Will “thumbs up” all of them. Looking forward to your other programming videos too.

Anton Alm says:

Bless you and your daughter. Great video.

rose9119111 says:

how can I download the GCC compiler for kali linux?
I looked for it but I could not find it.

can you please give me the link?

rospotreb pozor says:

I don’t understand why sometimes you have to use -llibname, and sometimes not.

R. Stallman says “Here is an example program which makes a call to the external function sqrt in the math library ‘libm.a’:”
Why does he bloat text with trash?
Simpler:
“Example program calls external function sqrt in math library ‘libm.a’:”

Aleksandr Bakhmach says:

Cool

Torstein Kvalvaag says:

These videos have been great, thank you.

Talal Shoukat says:

I am getting an error message
“error: too few arguments to function call, expected 6, have 4
sendfile(fd_client,fdimg,NULL,4000);”
Can anyone please help me out with it as i don’t know what other 2 parameters i have to enter..??

Michael Corleone says:

thanks bro

ShyneBrady says:

24:34 sure, I will copy it. Oh wait! It’s a video!

Kevin Pereda says:

I recommend you guys to check this book : “Linux Programming Unleashed”, there is an implementation of a web server in a more general approach.

triciopa1 says:

How would one do the flexible htmls? for example if I point to localhost:8080/helloworld.html it will display that particular view?

lakshmi kanth says:

Really I’m Very much Thankful for these Awesome tutorials…Thanks a lot

Undiscl0sed Name says:

+1

Qwerty Qwerty says:

What text editor did you use?

Mile Jovanovic says:

Can you upload a code of your tutorials?

Mayuresh Bakshi says:

How do I load index.html instead of writing the content in the webpage[ ] ?

Khairul Imam says:

eleven years ago. Cute!!

Write a comment

*

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours