Ben bir sayfa görüntülerin tüm src almak için çalışıyorum. Ancak bazı sayfalar mutlak yollarını kullanmak ve bazı yoktur. Yani bu ne yapmalı iyi yolu merak ediyorum?
şimdi ben kullanıyorum.
$imgsrc_regex = '#<\s*img [^\>]*src\s*=\s*(["\'])(.*?)\1#im';
preg_match_all($imgsrc_regex, $html, $matches);
For example webpage a might have the images as src="xyz.png" while others might use src="b.com/xyz.png" so is there a way to automatically append the url when necessary?