Skip to content

NeedForKillTheGame/nfk-planet-scanner-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFK Planet Scanner - PHP implementation of Planet Scanner for Need For Kill

Need For Kill - Quake 3 in 2D - free multiplayer game for Windows.

Game preview: http://www.youtube.com/watch?v=FgvgVttl0zE

More about Need For Kill: http://info.needforkill.ru

Installation

The best way to install the library is to use Composer package manager (http://getcomposer.org).

First, open your project directory (directory of your website where you want to use NFK Planet Scanner library) and create there file composer.json with following content:

{
    "minimum-stability": "dev",
    "require": {
        "nfk/planetscanner":"dev-default"
    }
}

Then open command line in your project directory and install composer:

MyNfkSite>curl -s http://getcomposer.org/installer | php

Or download composer.phar into your project dir manually: http://getcomposer.org/composer.phar

Next install NFK Planet Scanner library using composer via command line:

MyNfkSite>php composer.phar install

After installation you can find vendors dir appeared at your project root with NFK Planet Scanner code inside.

Usage

<?php
//if you installed the lib via composer use it's autoload.php, otherwise include PlanetScanner.php directelly
include "vendor/autoload.php";

use NFK\PlanetScanner\PlanetScanner;

// create a scanner instance, tho args: planet IP and Port
$scanner = new PlanetScanner("88.151.116.65", 10003);
$serversInfoArray = $scanner->getServers();
var_dump($serversInfoArray);

Requirements

  • PHP 5.3
  • sockets extension

Authors

License

NFK Planet Scanner is licensed under the MIT License - see the LICENSE file for details

About

NFK Planet Scanner - PHP implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages