esto es lo que tengo ya echo
Código PHP:
Ver original
<?php conectar(); if ($line["fetch"] == "1" ) { $online = "1"; } else { $online = "0"; } if ($online == "1") { $i = 0; $ip = $line["ip"]; $port = $line["port"]; $user = $line["user"]; $pass = $line["pass"]; $protocol = $line["protocol"]; $xml = simplexml_load_file($protocol."://".$user.":".$pass."@".$ip.":".$port."/users-active.xml?server=1"); $xml_2 = simplexml_load_file($protocol."://".$user.":".$pass."@".$ip.":".$port."/users-active.xml?server=2"); $proxyusers = "active-users"; foreach($xml->$proxyusers->user as $users) { $y = 0; $activesession = 0; $userstate = "0"; $xmlusername = ""; $activeusers[] = (string)$xml->$proxyusers->user[$i]->attributes()->name; $activeusersstate[(string)$xml->$proxyusers->user[$i]->attributes()->name] = $userstate; $xmlusername = (string)$xml->$proxyusers->user[$i]->attributes()->name; $userinfo[$xmlusername."-ipaddress"] = (string)$xml->$proxyusers->user[$i]->attributes()->ipaddress; $i++; } } desconectar(); conectar(); $sqllist = mysql_query("SELECT U.IDUsuario, U.Usuario, U.Clave FROM U.usuarios where D.IDDealer = U.IDDealer ORDER BY U.Usuario"); print(" ".$userinfo[$line["name"]."-ipaddress"]." "); } desconectar(); ?>
y quiero poder juntar el xml_2