LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-15-2019, 09:38 AM   #1
anon033
Member
 
Registered: Mar 2019
Posts: 188

Rep: Reputation: 13
Angry Simple HTTP Connection example


I am a little annoyed and feel like giving up. I need to write a program that does something very simple, I give it a server and have it connect to the server and then print a message based on whether it connected or not. I have been trying to find example code all week, but none exists. All I can find is how to write a server and client, I just need to write a basic program that connects to like duckduckgo.com or something in C. I just need a basic example so I can understand how it works and there is nothing out there. Does anyone have a simple example? I just need a basic http connection to a server and can't find anything.

Last edited by anon033; 06-15-2019 at 09:48 AM.
 
Old 06-15-2019, 09:46 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by FOSSilized_Daemon View Post
I can't find any tutorials anywhere for this, all I can find is how to make a server and client.
strange.
using C as language of choice i seem to get lots of relevant results.
 
1 members found this post helpful.
Old 06-15-2019, 09:53 AM   #3
anon033
Member
 
Registered: Mar 2019
Posts: 188

Original Poster
Rep: Reputation: 13
Quote:
Originally Posted by ondoho View Post
strange.
using C as language of choice i seem to get lots of relevant results.
The issue I am having is I just need a simple connection and don't understand the code enough to remove all the extra post stuff. I just need a simple example and there is nothing I can find.
 
Old 06-15-2019, 10:02 AM   #4
individual
Member
 
Registered: Jul 2018
Posts: 315
Blog Entries: 1

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by FOSSilized_Daemon View Post
The issue I am having is I just need a simple connection and don't understand the code enough to remove all the extra post stuff. I just need a simple example and there is nothing I can find.
Judging from your other posts regarding C programming, I think you need to focus on the basics before moving on to a more specific topic like networking. But, if you feel like you're up to the challenge this is a good introduction to sockets.
 
1 members found this post helpful.
  


Reply



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
Simple Slackware vs simple Arch vs simple Frugalware punchy71 Linux - Distributions 2 08-28-2012 02:30 PM
How to Rewrite www.example.com to example.com jayakumar01 Linux - Server 2 06-22-2012 09:28 AM
bind9: example.com works, www.example.com doesnt, and how to block urls Shwick Linux - Server 6 09-12-2011 12:26 AM
Need to remove port from http://www.example.com:3232 officecase Linux - Server 19 07-26-2007 02:00 AM
dns, http://www.example.com doesn't work davidhk Fedora 1 08-12-2005 04:25 PM

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

All times are GMT -5. The time now is 06:48 PM.

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