<?php$input = file_get_contents("http://codekicker.de/fragen/php-Links-HTML-Dokument-extrahieren-extrahieren-html-dokument-links/1836");if(preg_match_all("/<a\s[^>]*href=(\"??)([^\" >]*?)\1[^>]*>(.*)<\/a>/siU", $input, $matches, PREG_SET_ORDER)) { print_r($matches);}?>
Array( [0] => Array ( [0] => <a href="/" title="codekicker.de - .NET C# Java Javascript Exception"><img alt=".NET C# Java Javascript Exception" src="/res/exception-programmieren-fehler-java-csharp-forum-html-logo.png?v=2" title=".NET C# Java Javascript Exception" /> </a> [1] => " [2] => / [3] => <img alt=".NET C# Java Javascript Exception" src="/res/exception-programmieren-fehler-java-csharp-forum-html-logo.png?v=2" title=".NET C# Java Javascript Exception" /> ) [1] => Array ( [0] => <a href="#" onclick="document.getElementById('master-topMenu-loginLinkForm').submit();return false;">login</a> [1] => " [2] => # [3] => login )und so weiter und so weiter....