Unbeatable Tic-Tac-Toe

New Game
Player 2 Wins
X O
X O X
O X O

Warning: DOMDocument::load(): StartTag: invalid element name in /usr/local/www/apache24/data/tictactoe/games.xml, line: 10313 in /usr/local/www/apache24/data/tictactoe/index.php on line 36

Warning: DOMDocument::load(): Premature end of data in tag game line 10311 in /usr/local/www/apache24/data/tictactoe/games.xml, line: 10313 in /usr/local/www/apache24/data/tictactoe/index.php on line 36

Fatal error: Uncaught Error: Call to a member function getElementsByTagName() on null in /usr/local/www/apache24/data/tictactoe/index.php:38 Stack trace: #0 /usr/local/www/apache24/data/tictactoe/index.php(113): update_element('t9958', 'moves', 'X_OXOXOXO') #1 /usr/local/www/apache24/data/tictactoe/index.php(334): generate('X_OXOXOXO', 't9958') #2 {main} thrown in /usr/local/www/apache24/data/tictactoe/index.php on line 38