Is it possible to find the largest Image from the one I get back.
Here is the Code I have so far:
<?php
$url="https://wikipedia.org/wiki/PHP";
$html = file_get_contents($url);
$doc = new DOMDocument();
@$doc->loadHTML($html);
$tags = $doc->getElementsByTagName('img');
foreach ($tags as $tag) {
echo $tag ->getAttribute('src');
}
?>
For example img 1: 420x120px ; img 2: 1200x300px --> output link Url from img 2