warum bringt mir diese funktion:
immer nur einen link? egal wieviele href oder src attribute innerhalb von $html sind?
Code:
function get_links ($html) { $pattern = '/(href|src|background)=("|\')(.*)(\\2)/siU'; preg_match_all($pattern,$html,$matches); for ($i = 0;$i <= count($matches[3]);$i++) { $links[$i] = $matches[3][$i]; } return $links; }
Kommentar