에 네, 실제로 가능하다 가고 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";
}
}
}
이 충분히 당신을 주어야한다 사용하는 것이 좋습니다.
. 및 Guzzle의 내용을 얻으려면 visionmedia/php-selector과 같은 것을 사용하거나, 소스를 가져 오기 전에 몇 가지 컬을 사용하십시오.