I need to write a program (using Dev-C++) which can count the number of hyperlinks of a given web page. The main objective is to practice socket programming and try to use HTTP protocol.
I am not sure exactly how to go about doing this. Can anyone help me figure out how to do this? References or suggestions or anything that would point me in the right direction would really help.
(This is for my networking class)
Requirements:
a. Input: The users enter the URL of the desired web page without “http://”.
b. Output: Print all hyperlinks and the number of hyperlinks. Note that only <a href=”xxx”> should be counted while <link href=”xxx”> shouldn’t.