<?php
$getConnectionCountsPage = file_get_contents('http://10.57.180.171/getconnectioncounts');
$xml=simplexml_load_string($getConnectionCountsPage) or die("Error: Cannot create object");
foreach ($xml->VHost->ConnectionsCurrent as $child)
{
echo $child;
}
?>
這個例子會將整個XML裡找到VHost,再從VHost裡找到ConnectionsCurrent,然後取值
文章標籤
全站熱搜