<?php
function getLinks($link)
{
/*** return array ***/
$ret = array();
/*** a new dom object ***/
$dom = new domDocument;
/*** get the HTML (suppress errors) ***/
@$dom->loadHTML(file_get_contents($link));
/*** remove silly white space ***/
$dom->preserveWhiteSpace = false;
/*** get the links from the HTML ***/
$links = $dom->getElementsByTagName('a');
/*** loop over the links ***/
foreach ($links as $tag)
{
$ret[$tag->getAttribute('href')] = $tag->childNodes->item(0)->nodeValue;
}
return $ret;
}
?>
<?php
/***URL to Copy***/
$url = "http://xn--12ct3edm9aycubf0j2da1d.blogspot.com/2010/12/brilliant-legacy-1-14.html";
/*** Show <object> ***/
$object = getLinks($url);
print_r($object);
function getLinks($link)
{
/*** return array ***/
$ret = array();
/*** a new dom object ***/
$dom = new domDocument;
/*** get the HTML (suppress errors) ***/
@$dom->loadHTML(file_get_contents($link));
/*** remove silly white space ***/
$dom->preserveWhiteSpace = false;
/*** get the links from the HTML ***/
$links = $dom->getElementsByTagName('object');
/*** loop over the links ***/
foreach ($links as $tag)
{
$ret[$tag->getAttribute('id')] = $tag->childNodes->item(0)->nodeValue;
}
return $ret;
}
?>