hi,
i write a code code to capture all the image urls in the website we we submit the url of the website.And stored all the urls in the database.Now my requirement is to how to get the individual elements of the array.In the below code i print matches[0] it gives first element in the array.(ex : when i give the url as
http://www.yahoo.com and it capture the url as
http://www.yahoo.com/images/image.jpg and the result of matches gives all images urls ,matches[0] gives as 'h 'and matches[1] is 't'.But my requirement is to get the perticular total url that means
http://www.yahoo.com/images/image.jpg ).For that purose how i write a changes in my code to get perticular url.plz tell that.
PHP Code:
<?
echo "<b>Capture Images URLS :</b><br><br>";
preg_match_all( "/<img(.*)src=(\"|')(.*)(\"|\')(.*)[\/]?>/siU", $content, $match, PREG_PATTERN_ORDER);
print_r($match[3]);
$matches=implode("|", $match[3]);
mysql_query("insert into imageurls(urlname) values ('$matches')");
?>