First, the introduction
Xnova (Ogame) is one of the world's most popular war strategy web games, but also the most similar web games to emulate the object. You only need a Web browser, no need to download the client can do online games.
What kind of game is Xnova?
You are a cross Galaxy ruler, using different strategies to expand your strength. You will start your career on a planet of your own, where you build your economic and military base with existing resources. Through scientific research you gain access to new, advantageous technologies and new weapon systems. As the game progresses you will be migrating to multiple planets, with other players in the league, doing business with other players or waging war. No matter what you want to do, Xnova can make you do it!
Xnova is a very hot web game Ogame (Galactic Empire) of the same genre, the same theme of the game. Ogame is the subject of many of the three Chinese webgame plagiarism (BTW, I hate the Three Kingdoms).
statement: I learn to use the source code is open source projects, prohibited for commercial use, otherwise the consequences of conceit!
Original copyright belongs to Xnova development team!
Iron Captain version based on Xnova v0.8e modification!
This version has been discontinued and we do not provide any technical support!
This site to provide download is the system's improved version!
Site source Download Address: http://www.jb51.net/codes/180759.html
The process of our learning is in accordance with the sequence of program execution, before looking at the source code, first learned the basic PHP tutorial.
If you do not understand PHP, please first learn the PHP basic tutorial, or have the basis of C better!
It's best to install the PHP Debugging tools, and I'm using Zend studio 5,zend Debugger 5, which should be easy to use and can be found with Google's great God. Finally, a cup of hot tea will be ready to start.
Second, the entrance (index.php)
This file is the entrance to the game, only a few lines of code, function at a glance: first to determine whether the config.php file size is zero, if it is, redirect to the install/directory to perform the installation operation, otherwise redirect to the login.php display landing page. The source code is as follows:
if (filesize (' config.php ') = = 0) {
header (' location:install/');
Exit ();
}
Header (' location:login.php ');