   Talking to a php page via sockets
  Hello all,I'd like to have your inputs on what would be the best way toA) Download the content of an html/php page from a C/C++ programB) Send a form via POST to a PHP page (from the C program)The tricky part : i want to do it with internet sockets send/recvAfter some research, looks like libcurl would best suit my need. But for the experience, I would like to do it directly with the sockets.Thanks for any lights on this.   
Quote:The tricky part : i want to do it with internet sockets send/recvAfter some research, looks like libcurl would best suit my need. But for the experience, I would like to do it directly with the sockets.Ok, so you'll implement HTTP protocol, along with all the queries and required handlings, encodings, as well as streaming logic.So... why not use an existing library?HTTP isn't a complex protocol, but it's an annoying one. If this is for broad general use, you'll need to support it reliably, including various security extensions.If it's for one particular page only - why waste time?The easiest way to do this bare bones is probably to manually construct HTTP requests strings, and send those. It might be possible to even ignore the result. Just go through HTTP RFC to see what you need to send.wget or wput (is there such a thing, or can wget do it?) should solve this without programming altogether.   ;  Curl is fine. I recommend you use it.If you want to see how to get the output of a page using WinSock, try the HTTP-GET sample on my web page. Simple code you can just drop in, and it will let you get any web page (including PHP pages).;  thank you for your replies, I think I'll go with libcurl!   