0

Here is a tool for WHOIS lookups that I use: http://apps.db.ripe.net/search/lookup.html

It can present information in an XML file, like this: http://apps.db.ripe.net/whois/lookup/ripe/inetnum/192.36.171.155.xml

Let's say I wanted to read the XML file by using PHP and present the netname and descr fields in an HTML document, how would I do that?

jman
  • 464
  • 1
  • 4
  • 16

2 Answers2

2

Take a look at SimpleXML. Once you've loaded the file it's easy to traverse...

$xml = simplexml_load_file('http://apps.db.ripe.net/whois/lookup/ripe/inetnum/192.36.171.155.xml');
echo $xml->objects->object->attributes->attribute[1]->attributes()->value;
fire
  • 21,383
  • 17
  • 79
  • 114
0

have you searched PHP XML Parser on Google ?

Grooveek
  • 10,046
  • 1
  • 27
  • 37