Here you can find an example implementation of a Four In A Line Console Client. You need the curl functions/extension for this.

You can see the code for this console client on github, or directly download the code as a zip archive.

You can put your own PHP player-class into the folder (see Player1.php) and then start the Game.

Usage: php startConnectFourAgainstServer.php Player-Filename [width] [height] [enemyId]

A simple example with Player1.php playing against EnemyId 1 on a 7*6 grid would be

# php startConnectFourAgainstServer.php Player1.php 7 6 1

If you start the Client without any of the optional parameters a 7*6 game will start and you will be asked for the enemy:

# php startConnectFourAgainstServer.php Player1.php

Starting ConnectFourAgainstServer...
==============================
Found player class 'Player1' in file 'Player1.php'.

Please choose your enemy:

1 Rudi Random
2 Philipp Percent
3 Andi Avoid
4 Michael Kliewe

EnemyId: