$f = fopen($tempName, 'r'); while ($data = fread($f, 4096)) { $xml .= $data; } fclose($f); preg_match_all("/\\<Ban\\>(.*?)\\<\\/Ban\\>/s", $xml, $banBlocks); foreach ($banBlocks[1] as $block) { preg_match_all("/\\<SteamID\\>(.*?)\\<\\/SteamID\\>/", $block, $steamId); preg_match_all("/\\<IP\\>(.*?)\\<\\/IP\\>/", $block, $ip); preg_match_all("/\\<Name\\>(.*?)\\<\\/Name\\>/", $block, $name); preg_match_all("/\\<Length\\>(.*?)\\<\\/Length\\>/", $block, $length); preg_match_all("/\\<TimeScale\\>(.*?)\\<\\/TimeScale\\>/", $block, $timeScale); preg_match_all("/\\<AddDate\\>(.*?)\\<\\/AddDate\\>/", $block, $addDate); preg_match_all("/\\<ExpireDate\\>(.*?)\\<\\/ExpireDate\\>/", $block, $expireDate); preg_match_all("/\\<Webpage\\>(.*?)\\<\\/Webpage\\>/", $block, $webpage); $id = $banQueries->importBan($steamId[1][0], $name[1][0], $length[1][0], $timeScale[1][0], $addDate[1][0], $expireDate[1][0], $webpage[1][0], $reason, $ip[1][0]); if ($id > 0) { $count++; } else { $alreadyAdded++; $alreadyDs .= " - " . $LAN_IMPORTBANS_015 . $steamId . "<br>"; } } $bansAdded = true; } } // Display that the changes were successful if ($bansAdded) { ?> <h5 class="error"><?php echo $count;