你将要使用DOMDocument和DOMXPath
// if the below line does not work, you will need to use CURL or similar.
$theHtmlToParse = file_get_contents('http://url.to/page.html');
$doc = new DOMDocument();
$doc->loadHTMLFile($theHtmlToParse);
$xpath = new DOMXpath($doc);
$elements = $xpath->query("*/div[@class='bio']/div[@class='value']");
// We now have an array of elements, or null
if ($elements !== null)
{
foreach ($elements as $element)
{
echo "<br/>[". $element->nodeName. "]";
$nodes = $element->childNodes;
foreach ($nodes as $node)
{
echo $node->nodeValue. "\n";
}
}
}
这应该给你足够的去:)