-1

How to fetch HTML in C or C++? with Sockets. Can you give me a Example code pls?

NOTE - I originally closed this, but reopened. To the poster - Please see:

https://stackoverflow.com/questions/400688/fetch-web-page-in-c

and

Programmatically reading a web page

Community
  • 1
  • 1
Question
  • 1,379
  • 3
  • 13
  • 6
  • You should have edited your original question with more detail instead of posting another similar one... – cschol Dec 30 '08 at 16:53

2 Answers2

5

You may use libcURL. Refer to this post: Programmatically reading a web page

Community
  • 1
  • 1
Gant
  • 29,363
  • 6
  • 45
  • 63
1

You're not mentioning any platform, so I give you an answer for Win32.

One simple way to download anything from the Internet is the URLDownloadToFile with the IBindStatusCallback parameter set to NULL. To make the function more useful, the callback interface needs to be implemented.

Johann Gerell
  • 24,135
  • 10
  • 69
  • 120