]>
jfr.im git - irc/gameservirc.git/blob - gameserv/php/readplayers.php
2 $handle = @fopen("$playerdata", "r
");
4 while (!feof($handle)) {
5 $buffer = fgets($handle, 4096);
6 $player = explode(" ", $buffer, 16);
14 $strength = $player[7];
15 $defense = $player[8];
16 $forestfights = $player[9];
17 $playerfights = $player[10];
18 $lastlogin = $player[13];
19 $weaponnum = $player[14];
20 $armornum = $player[15];
21 $query = "insert into
$playertablename values ('$name', '$exp', '$gold', '$bank', '$hp', '$maxhp', '$strength', '$defense', '$forestfights', '$playerfights', '$lastlogin', '$weaponnum', '$armornum')";
22 // mysql_query($query);
23 echo "\n" . $query . "\n";