3

I've been self teaching myself C++ for the last 6 months and I would like to put my little acquired knowledge into a relatively useful program. I would like to make a program that will ask for an input, (here's the tricky part) search in a list of websites (including other pages in said website) for that input's value and display the results. Truth is, I don't really know how to get started since I haven't read any guide on c++ and networking, so if you do have a good guide in mind, please share it with me, much appreciated.

EDIT: Sorry I wasn't clear enough, the program in itself isn't really what worries me, i'm just looking for a guide that explains how to combine c++ and networking. And I want it to be something like a price comparison program, take an input from the user, search the input in a list of websites, get the result, look for it's value and display the results in an increasing order

Newbie2SO
  • 31
  • 1
  • 3
  • You want to take the input from a list of website or what.Plz Elaborate – smali Jul 23 '14 at 04:43
  • Sorry I wasn't clear enough, the program in itself isn't really what worries me, i'm just looking for a guide that explains how to combine c++ and networking. And I want it to be something like a price comparison program, take an input from the user, search the input in a list of websites, get the result, look for it's value and display the results in an increasing order – Newbie2SO Jul 23 '14 at 04:45
  • 1
    Looking for guide is off-topic here. – Yu Hao Jul 23 '14 at 04:50
  • I have apparently pissed off 2 guys and getting flagged for off-topic, I'm not really sure what have I done wrong, if someone were to tell me I would make sure I don't do it again – Newbie2SO Jul 23 '14 at 05:01
  • Off-topic means your question isn't appropriate for SO and should be closed, that's all, it's nothing personal. Read [What topics can I ask about here?](http://stackoverflow.com/help/on-topic) – Yu Hao Jul 23 '14 at 05:13
  • @Newbie2SO SO is intended for specific questions that can be answered in a precise manner, asking for a tool/library or anything else which is based on opinion is better suited for a discussion forum (even though sometimes opinion based things do sneak through here). – AndersK Jul 23 '14 at 05:16
  • Sorry about it, will not happen again – Newbie2SO Jul 23 '14 at 05:19
  • But you can edit and change it What are the different libraries, what we use for xyz, How we do xyz ... not for good, Or opinion based. – smali Jul 23 '14 at 05:22
  • TBH I don't think the question can be salvaged. We'd still want the question to show a reasonable effort - you should have spent enough time searching for an answer on the Internet. And in this case, you'd have a list of viable options. Also missing from this question is the high-level breakdown which shows the problem is understood. In this case, it's worrying that HTML isn't even mentioned. – MSalters Jul 23 '14 at 12:07

2 Answers2

5

You may wish to start looking into Networking libraries for c++. keep in mind there are many library and choosing the right one will purely depends on your requirement. Here is the quick list of c++ networking libraries that I've considered in past!

Also see the post by 'George Stocker' at https://stackoverflow.com/a/118968/3685825

Community
  • 1
  • 1
Ankit Patel
  • 1,191
  • 1
  • 9
  • 9
  • Thanks for the quick reply, I'll look into them right now. – Newbie2SO Jul 23 '14 at 05:00
  • @Ankit Patel Good listing I don't know about POCO have you used it. – smali Jul 23 '14 at 05:25
  • @ali786, "Have I used Poco for networking?" In a commercial product? No. However I have used it with the initial prototype building. A good POCO networking guide at http://pocoproject.org/slides/200-Network.pdf – Ankit Patel Jul 23 '14 at 05:46
1

Generally We Use Sockets In c++ for Network programming. And Sockets uses following protocol families.

PF_UNIX Local communication

PF_INET Internet (TCP/IP)

PF_NDD The operating system NDD

PF_INET contains following protocol.

TCP

UDP

RDS

IP

Internet Control Message Protocol (ICMP)

And for Calling an HTTP protocol you need a middle-ware since socket can't communicate directly to the HTTP protocol.

See this question for calling an HTTP URL from c++.

How do you make a HTTP request with C++?

And for socket Reference I suggest you to read

dvanced Programming in the UNIX® Environment. By W. Richard Stevens, Stephen A. Rago

for other references

What is a good book/guide for socket programming in C?

Community
  • 1
  • 1
smali
  • 4,687
  • 7
  • 38
  • 60