13 Years
Discussion Span
Last Post by c_raj

Ive made a program in .sh that flushes urls with topic into standrard out, now i want to make that program do the same as a c++, please help any 1
basicly i need the program to "download" urls with matching topic from the site... :idea:

Basically what you need to do is download the site and parse the html data right? If that is the case, the easiest way is to do it using sockets.

Use sockets to send information to the server in the form of http commands (on port 80).

example using a socket connect to a server on port 80 and send the following data: "GET http://www.google.com/ HTTP/1.1" . Then retrieve the information the server sends back.

Another approach, if you are ungfamilar with packets, is to use a standard output redirection. Launch a program, like telnet, feed it commands and redirect the stdout to your program and parse the data.


basiclly i need all the hrefs on the site but is ther any good examples out there?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.