hi
i will to grab this image tags and download from source url
match string: <div id="divnewsh"><img src="/news/image/imagename.jpeg" alt="blabla" width="300" border="0" class="imgnews"/></div>
how can i only image name and ext. (imagename.jpeg) matching
if (preg_match('#<div id="divnewsh"><img src="(.*?)"#', $f, $matches)) {
$images=$matches[1];
$images=trim($images);
$url = "http://urldomain.com".$images;
$target = "./news/".$images;
$file = fopen($target,"r");
while(!feof ($file))
{
$content1 = fgets($file, 4096);
$content .=$content1;
}
fclose($file);
$file = fopen($target,"w");
fwrite($file,$target);
fclose($file);
}
thanks..