$content = file_get_contents('dosya.php'); preg_match_all('~href="([^"]*)"~si', $content, $matches); foreach($matches as $m) { echo $m, '<br />'; }