Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C C++ 1

Status
Not open for further replies.

1Stewart

Programmer
Aug 13, 2002
1
AR
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.


Here are some links:

HTTP/1.0 - RFC 1945

HTTP/1.1 - RFC 2068

Beej's Guide to Network Programming


Hope this helps! [thumbsup]
Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.

- janvier -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top