Код:
<?
function connect($i){
global $data;
$host[0] = "angelscity.combats.ru";
$host[1] = "www.combats.ru";
$host[2] = "demonscity.combats.ru";
$host[3] = "devilscity.combats.ru";
$fp = fopen ("http://".$host[$i]."/inf.pl?short=1&login=Sotnic", "r");
while (!feof($fp)) {
$data .= fgets($fp, 1024);
}
fclose ($fp);
if (ereg("Found", $data)) {
$i++;
connect($i);
}
}
connect('0');
$data = preg_replace("/.*\r\n\r\n/sm","",$data);
echo nl2br($data);
$list = explode("\n", $data);
while(list(,$k)=each($list)) if(preg_match("/(.*)=(.*)/",$k,$matches)) eval ("\$".$matches[1]." = \"".$matches[2]."\";");
?>