开发者

How to receive XML data produced by a website in PHP?

I have been tryin开发者_如何学编程g Simple XML but I can not navigate through the structure of the file. This is the URL I am trying to parse. https://ws.brreg.no/lod/data/982463718


Have you looked at what you're receiving from that site? Instead of feeding the content directly to simpleXML, capturee it in a variable instead and output that. Perhaps you've been banned from that site for exessive usage, and you're getting a 401-denied error page instead of the XML you're expecting:

$content = file_get_contents('https://ws.brreg.no/lod/data/982463718');
echo '<pre>', htmlspecialchars($content), '</pre>';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜