Info do it your self very easy.
http://www.the-art-of-web.com/php/parse-links/
<?php
// Original PHP code by Chirp Internet:
www.chirp.com.au
// Please acknowledge use of this code by including this header.
$url ="
http://www.example.net/somepage.html";
$input =@file_get_contents($url)ordie("Could not access file: $url");
$regexp ="<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>";
if(preg_match_all("/$regexp/siU", $input, $matches)){
// $matches[2] = array of link addresses
// $matches[3] = array of link text - including HTML code
}
?>
Easy peasy
Or
/*
Function to get all links on a certain url using the DomDocument
*/
function get_links($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;
}
//Link to open and search for links
$link = "
http://www.php.net";
/*** get the links ***/
$urls = get_links($link);
/*** check for results ***/
if(sizeof($urls) > 0)
{
foreach($urls as $key=>$value)
{
echo $key . ' - '. $value . '<br >';
}
}
else
{
echo "No links found at $link";
}