I have some url and all the html of these urls have the following tag in their tag
<link rel="image_src" href="http://imgv2-4.scribdassets.com/img/word_document/15490455
/164x212/8a4ab0c34b/1337732662" />
I am using the following code
$url = 'my url';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); // The url to get links from
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone
$result = curl_exec($ch);
$regex='|<a.*?href="(.*?)"|';
preg_match_all($regex,$result,$parts);
$links=$parts[1];
foreach($links as $link){
//if(strpos($link,'format=json') !==false) {
echo $link;
//}
}
Now I want to grab this link href but how, I don't know. Please help me
Thanks