hi <?php
$ifile = 'in.txt';
$ofile_mask = 'ou%d.json';
$odata_mask = <<<HERE
{
"Enabled": true,
"StartOnLaunch": true,
"SteamApiKey": "ваш апи",
"SteamMasterID": "ид главного бота",
"SteamMasterClanID": "ид группы",
"SteamLogin": "%s",
"SteamPassword": "%s",
"ForwardKeysToOtherBots": true,
"DistributeKeys": true,
"CardDropsRestricted": true,
"CustomGamePlayedWhileIdle": null,
"GamesPlayedWhileIdle": [
440
]
}
HERE;
$ifh = fopen($ifile, 'r');
if($ifh)
{
$ctr = 0;
while (($line = fgets($ifh)) !== false)
{
$line = trim($line);
list($login, $passw) = explode(':', $line);
$ofh = fopen(sprintf($ofile_mask, $ctr++), 'w');
if($ofh)
{
fwrite($ofh, sprintf($odata_mask, $login, $passw));
fclose($ofh);
}
}
fclose($ifh);
}
?>