DOMパース php

 
[highlight_php]

$url = 'https://ultimai.org/wp';
$html = file_get_contents($url);

$doc = new DOMDocument();
$doc->loadHTML($html);

$xmlString = $doc->saveXML();
  $xmlObject = simplexml_load_string($xmlString);
	  $html = json_decode(json_encode($xmlObject), true);
	var_dump($html);exit;		

[/highlight_php]


 

Categories:

Tags: