View Full Version : using web browser "links" in C

Lord CyKill
04-30-2003, 10:59 AM
I want to use text-based web browser "links" to store the html code of a website.but dont know what is the way to implement it in a
c-program. e.g. to save the html code of cprogramming.com, how do i do that? Also, if i want to detect any active links to other pages in the stored html codethan how should i distinguish those from the html code?

04-30-2003, 04:03 PM
>strstr( line, "<a href" ); maybe?
Sometimes '<a href' can contain "blank" links, like:

<a href="#" onClick="javascript:void test('lala')"></a>

It is a poor using of the <A> element, in this case, I think it's better to use a regular expression to check if contains a link.