Had the same problem once, you might be able to pick what you need:
PHP Code:
<?php
echo "scriptdata2mysql by 123123231 29.05.2013\n";
mysql_connect("127.0.0.1:3306", "root", "asd");
mysql_select_db("cod2_test");
$numFiles = 0;
$numStats = 0;
$numErrors = 0;
foreach (glob("*.serverstats") as $filename)
{
$guid = substr($filename, 0, -strlen(".serverstats"));
$content = file_get_contents($filename);
$stats = explode("\n", $content);
foreach ($stats as $stat)
{
$tmp = explode(",", $stat);
$n = count($tmp) . " ";
if ($n != 3)
continue;
$key = $tmp[0];
$value = $tmp[1];
//echo "$n $guid $key => $value\n";
mysql_query("INSERT INTO `stats` (`guid`, `key`, `value`) VALUES ($guid, '$key', '$value')");
if (mysql_error())
{
echo mysql_error() . "\n";
$numErrors++;
}
$numStats++;
}
$numFiles++;
}
echo "Done! Files=$numFiles Stats=$numStats Errors=$numErrors\n";