PHP Web Game Learning Xnova (Ogame) source Interpretation (a) _php instance

Source: Internet
Author: User
Tags php debugging tools
First, Introduction

Xnova (Ogame) is one of the world's most popular war strategy web games, and is the object of most similar web games to emulate. You only need a Web browser, no need to download the client to do online games.

What kind of a game is Xnova?

You are the ruler of a trans-galaxy, using different strategies to expand your strength. You will start your career on your own planet, where you build your economic and military base with existing resources. Through scientific research one obtains access to new, advantageous technologies and new weapon systems. As the game progresses you will be migrating to multiple planets, federating with other players, doing business with other players or waging war. No matter what you want to do, Xnova can make you do it!

Xnova is a game of the same genre and theme as the Ogame (Galactic Empire), which is now a very hot web game. Ogame is the subject of the webgame of many Three kingdoms (BTW, I hate the three countries).


Disclaimer: I learn to use the source code is open source projects, prohibited for commercial purposes, otherwise the consequences!

Original copyright is owned by Xnova development team!

Iron Captain version based on Xnova v0.8e modified!

This version has stopped updating and we do not provide any technical support!

This site provides download is the improvement version of the system!

Source code Download Address: http://www.php.net/codes/180759.html

We learn the process is in accordance with the order of the program execution, before looking at the source code, first learned the basic PHP tutorial.

If you do not understand PHP, please first learn the basic PHP tutorial, or have C based on better!

It is best to install PHP Debugging tools, I use Zend studio 5,zend Debugger 5, the use of methods should not be difficult, and these can be found by Google God. Finally prepare a cup of tea, you can start.

Ii. Entrance (index.php)

This file is the game's entrance, only a few lines of code, function at a glance: first determine whether the config.php file size is zero, if so, redirect to the install/directory to perform the installation operation, or redirect to login.php display landing page. The source code is as follows:

if (filesize (' config.php ') = = 0) {header (' location:install/'); exit ();} Header (' location:login.php ');
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.