Hi people: I'm searching for some C or C++ program to read and send data from a Web Server, (acting just like a browser do). Does anyone knows a good program or site ?
Thanks a lot.
Perhaps you should look into Java... the Java to do this would be a lot easier... Personally, with C/C++ I'd go looking for a library of socket code, and tear it apart. Unfortunatly the only way I know how to do this in any C language is to use Visual C++... which is EVIL. Perhaps getting ahold of the code for Open DOS's HTML/HELP program would be start, or perhaps Lynx (I think Lynx is GPL'd). Try sourcefourge.
I have done a similar project like this one. Our project was called HTTP-SIM and what it does is to bombard the web server with simultaneous requests and posts. It is sort of a stress simulator for the web server to see how it fares on multiple requests. Unfortunately, it is the property of the company I work for so I cannot give it to you. I can give you a few suggesstions.
I suggest that you should know how to use sockets. You should learn network programming. It is also simple and I provided a link below.
Get a copy of the HTTP protocol. There are online resources for this. The best one is from the RFCs. I think it is RFC 1945 for HTTP/1.0 and RFC 2068 for HTTP/1.1. You should study how data gets transmitted across sockets. I is typically sending a "GET" or "POST" commands. It is actually simple because all you will be sending are strings.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.