You are here: Home » Reply

Reply To: FireStats – Top 40 php script (now with added charts)

#14833

Anonymous

Ok, thanks to your link, it looks like PDO is working now, but I’m getting more errors in my php log now…

[05-Oct-2008 17:23:56] PHP Warning:  domdocument::domdocument() expects at least 1 parameter, 0 given in C:Inetpubwwwrootfunctions.php on line 113

[05-Oct-2008 17:23:56] PHP Fatal error: Call to undefined method domdocument::load() in C:Inetpubwwwrootfunctions.php on line 114

113 is the $xmlDoc = new DOMDocument(); line…

function getFirefly($FFhost="cosmos", $FFport=9999)
{
$firefly="Firefly";

$xmlDoc = new DOMDocument();
$xmlDoc->load("http://$FFhost:$FFport/server-info?output=xml");
$x = $xmlDoc->documentElement;

foreach ($x->childNodes AS $item)
{
if("$item->nodeName" == "dmap.itemname")
$firefly=$item->nodeValue;
}

return $firefly;
}

But if I go to http://cosmos:9999/server-info?output=xml I get a valid XML output…