HTML parsing algorithm for extracting  tags
First of all, as Loki mentioned in the comments, it is incredibly cumbersome to parse any text that made by human. We tend to abuse things, so I'd refrain from parsing it myself. There are good libraries that does parsing. If you want performance, I'd go with boost.spirit that is based on expression templates. I've also made a topic request about expression templates on so.docs, but it still has low upvote count, so don't rely on it to come in near future. I strongly encourage you to read about both, because it is the greatest power to have in parsing input files.
About the code:
Good try, but probably you will need a lot more. Some people would think that I need to put suggestion about regex over hand rolled search, but I will just put
link to an article on very famous blog.
Use &lt;cstdio&gt; instead of &lt;stdio.h&gt;. All C headers have C++ equivalents and are preferred over C ones.
Don't mix &lt;cstdio&gt; and &lt;iostream&gt;. The I/O may become unordered.
Overflow:
int can and will overflow. For example here:
iterator + second_iterator

The C standard guarantees only 16 bit for it as I remember. It is not mandated by the standard that return type of the std::string::size() is int. In fact it will probably never be int, because it is signed type, but size can not be negative. I recommend you to use std::string::size_type. It is guaranteed by the standard that this type will have enough capacity to store the maximum possible index that std::string can have.
Readability comments:
second_iterator - 2
second_iterator - 1

Those 2 expressions rise alerts in my head, because type of second_iterator is int, which is signed. I know that it will never be less than 2 by design, but I think that there is at least one better solution, one of which is mentioned above.
I'd wait bool(s) from any function that has check word in it's name. I think the function now performs what sequence of std::string::find()s does. This suggests using standard one. It will be much more clear.
Performance comments:
Usually standard containers are implemented in terms of 3 pointers, not a pointer and 2 indices. This suggests that iterator based algorithms will outperform index based ones. Further reading.
I found it impractical using push_back() without preceding reserve() call where performance matters. On top of that, every push will have control flow manipulators, which will greatly decrease the throughput on the function.
I'd use std::string::compare to compare check string and the substring. The implementations are allowed to deploy more intelligent comparison functions, so it might have zero development cost optimization.
Redesign:
I'd redesign the function to accept Input Iterators. It will make it more customizable with zero runtime overhead (well it depends on the iterator, but it is possible and easy to do). It will also keep strings from being copied.
Notes about example code:
You can use range for loop to traverse whole container/range.
Declaring urlmap right on assignment would trigger copy elision (the output will start constructing right in urlmap).
Don't use system(). It is the source of many security issues.