"; if($FontSize){ print ""; } print str_replace("<","<",$xml); if($FontSize){ print ""; } print ""; }else{ $Results=xml2array($xml); if($aurow[NewLineSubstitutionString]){ $vars[XMLNewLineSubstitutionString]=$aurow[NewLineSubstitutionString]; } foreach($Results[SiteStatus] as $Line){ print "
"; print_r($Line); print ""; } } exit(); function http_get($URL){ $URL=str_replace("\"","%34",$URL); $URL=str_replace("\n","",$URL); return `/usr/bin/lynx -source "$URL"`; } function xml2array( $textXml ){ $regExElements = '/<(\w+)([^>]*)>(.*?)<\/\\1>/s'; $regExAttributes = '/(\w+)="([^"]*)"/'; preg_match_all( $regExElements, $textXml, $matchElements ); foreach ( $matchElements[1] as $keyElements=>$valElements ) { if ( $matchElements[2][$keyElements] ) { preg_match_all( $regExAttributes, $matchElements[2][$keyElements], $matchAttributes ); foreach ( $matchAttributes[0] as $keyAttributes=>$valAttributes ){ $arrayAttributes[ $valElements.' attributes' ][$matchAttributes[1][ $keyAttributes ] ] = $matchAttributes[2][ $keyAttributes ]; } }else{ $arrayAttributes = null; } if ( preg_match( $regExElements, $matchElements[3][$keyElements]) ) { if ( $arrayAttributes ){ $arrayFinal[ $valElements ][ $valElements.' attributes' ] = $arrayAttributes[ $valElements.' attributes' ]; } $arrayFinal[ $valElements ][] = xml2array( $matchElements[3][$keyElements] ); }else{ $arrayFinal[ $valElements ] = $matchElements[3][ $keyElements ]; $arrayFinal = array_merge( $arrayFinal, $arrayAttributes ); } } return $arrayFinal; } ?>