I created this script to get the sources of the images from a single webpage, now, i wanted to download all those images to my server using curl.
<?php
// Create DOM from URL or file
require_once 'library/simple_html_dom.php';
$html = file_get_html('http://adamkhoury.com/');
// Find all images
foreach($html->find('img') as $element) //every image found is declared as $element
echo $element->src . '<br>';
?>