I have a string containing a HTML document and I want to extract all URL's from it. I tried this:
preg_match_all('/(http:\/\/){1}.{1,}\..{1,}/', $html_document /* a valid document, containing a lot of links*/, $matches);
print_r($matches);
But instead of array containing all links, I get parts of HTML code.
What's wrong with my code?