Lo siento, voy algo perdido, a ver si esto echa un cable (:
Código PHP:
Ver original$file = "file.txt"; // xml formatted text file... <---- url remota?
$doc = new DOMDocument();
$doc->loadHTMLFile($file);
$xpath = new DOMXpath($doc);
// example 1: for everything with an id
//$elements = $xpath->query("//*[@id]");
// example 2: for node data in a selected id
//$elements = $xpath->query("/html/body/div[@id='yourTagIdHere']");
// example 3: same as above with wildcard
//$elements = $xpath->query("*/div[@id='player']");
foreach ($elements as $element) {
// echo "<br/>[". $element->nodeName. "]";
$nodes = $element->childNodes;
foreach ($nodes as $node) {
echo $node->nodeValue. "\n";
}
}
}
?>
y/o
Código PHP:
Ver original$nodes = $element->childNodes;
foreach ($nodes as $node) {
$line_content $node->nodeValue;
preg_match('/(file_url=).?*(&)/is',$line_content,$return); if(!empty($return[0])){$results[] = $line_content; unset($return);} }
?>