Good day. There is a certain .ini file which contains a large array of information about users. It is necessary to display all the information in the file in a readable form (per user by line) on the site page. Then add several conditions (for example: in one of the additional fields, if one of the user parameters = from 0 to 2500, then output one image, from 2501 to 5000 - another, etc.). Explained somewhat crooked =) I hope you understand ...
Here are 2 entries from the .ini file:
[76561198777556446 StatsObject] PlayerName=Puma PlayerIP=86.102.208.50:14079 SelectedVeterancy=ServerPerksV3.SRVetSharpshooter DamageHealedStat=0 WeldingPointsStat=2620 ShotgunDamageStat=5159 HeadshotKillsStat=68 StalkerKillsStat=0 BullpupDamageStat=0 MeleeDamageStat=1859 FlameThrowerDamageStat=0 SelfHealsStat=0 SoleSurvivorWavesStat=0 CashDonatedStat=0 FeedingKillsStat=0 BurningCrossbowKillsStat=0 GibbedFleshpoundsStat=1 StalkersKilledWithExplosivesStat=0 GibbedEnemiesStat=16 BloatKillsStat=15 SirenKillsStat=6 KillsStat=298 ExplosivesDamageStat=10406 TotalZedTimeStat=135.000000 [76561200266252308 StatsObject] PlayerName=Arko74 PlayerIP=81.20.166.175:54019 SelectedVeterancy=ServerPerksV3.SRVetSupportSpec DamageHealedStat=1282 WeldingPointsStat=22490 ShotgunDamageStat=9086 HeadshotKillsStat=944 StalkerKillsStat=239 BullpupDamageStat=321378 MeleeDamageStat=12972 FlameThrowerDamageStat=0 SelfHealsStat=279 SoleSurvivorWavesStat=9 CashDonatedStat=3440 FeedingKillsStat=0 BurningCrossbowKillsStat=0 GibbedFleshpoundsStat=0 StalkersKilledWithExplosivesStat=35 GibbedEnemiesStat=132 BloatKillsStat=199 SirenKillsStat=63 KillsStat=4295 ExplosivesDamageStat=59712 TotalZedTimeStat=2199.000000
Here is my solution:
here is my solution, but the result is rather sad ...
<body bgcolor="#fff"> <? $num_of_mes = 500; // количество сообщений на странице $num_of_mes2 = 15000; $i=-28;$i2=-7;$i3=-24;$i4=-25;$i5=-4;$i6=-5;$ii2=-7; $messages_array = file("ServerPerksStat.ini", true); $overall_output = $messages_array; srand ((double) microtime() * 10000000); echo "<table align=Left bgcolor=#fff cellpadding=8 cellspacing=0 border=1 style='font-size :10px'>"; echo "<tr><td>".Игрок."</td><td>".Убийств."</td><td>".Сварка."</td><td>".Медицина."</td><td>".Очки."</td><td>".Игровое_время."</td></tr>"; for($m=0;$m<$num_of_mes;$m++) {$i=$i+29;$i2=$i2+29;$i3=$i3+29;$i4=$i4+29;$i5=$i5+29;$i6=$i6+29; if($num_of_mes==1) { echo "<tr><td>".$overall_output[$i]."</td><td>".$messages_array[$i2]."</td><td>".$messages_array[$i3]."</td><td>".$messages_array[$i4]."</td><td>".$messages_array[$i5]."</td><td>".$messages_array[$i6]."</td></tr>"; } else { echo "<tr><td>".$overall_output[$i]."</td><td>".$messages_array[$i2]."</td><td>".$messages_array[$i3]."</td><td>".$messages_array[$i4]."</td><td>".$messages_array[$i5]."</td><td>".$messages_array[$i6]."</td></tr>"; } } echo "</table>"; ?>
I tried to do everything through the function parse_ini_file (), but somehow unsuccessfully ...
Help me to understand