i'm working on a small site about chess.
The standart format chess games are saved in is .pgn
Now i want to read this data and store it into variables so I can use it in my website. (It's like a gameviewer.)
anyway, a pgn file looks like this
How can I read the Information in the brakets [] into variables and how can I read the moves. The problem is, that they don't have a fixed length.Code:[White "PlayerWhite"] [Black "PlayerBlack"] [Other comments] 1. e4 d6 2. d4 f5 3. f4 fxe4 4. Qg4 Bxg4 5. Nc3 Bd1 ... {black checkmated} 1-0
Please help!
FES GERMANY




Reply With Quote