custom
Cea
]*>/';
preg_match_all($pattern, $html, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$link = $match[1];
$target = $match[2];
$validLink = $url . ltrim($link, '/');
$linkHtml = file_get_contents($validLink);
$imgPattern = '/
]*>/';
preg_match($imgPattern, $linkHtml, $imgMatch);
if (isset($imgMatch[1]) && isset($imgMatch[2])) {
$imgSrc = $imgMatch[1];
$imgAlt = $imgMatch[2];
echo '' . $validLink . '
';
echo '
';
}
}
?>
Source Code