PHP CLI execution
phpMIB is a shell script, this means that in order to execute it you have to set up the CLI version of PHP on the enviroment phpMIB runs on. We won't provide here a specific documentation about PHP usage from commandline. Please look at the official documentation for installation, configuration and usage of the CLI version.
This is all you have to know just for start executing phpMIB:
  • on Win32 enviroment enter the dos shell and launch c:\path\to\php-cli\php.exe -q _phpMIB-1.1.php [server] [channel]
  • on *NIX you can both launch /path/to/php-cli/php -q _phpMIB-1.1.php [server] [channel] or add as the first line of the phpMIB's script the line #!/path/to/php-cli/php -q, give execution permission to it and then just launch ./_phpMIB-1.1.php [server] [channel]
(note that you can rename as you prefer the phpMIB's script filename, obviously in the examples above we used the default one)

Parameters:
  • [server] is the IRC server you want to connect the bot to
  • [channel] is the IRC channel you want to let enter the bot in

phpMIB configuration
We haven't provided a configuration file for phpMIB yet (the feature will be ready soon), so you'll need to change some values directly in the script's source. Here's a list of the values you would change (line, variable, description):
  •  75, $nick, default phMIB's nickname
  •  76, $nickSleeping, sleeping mode phpMIB's nickname
  •  77, $pass, password of phpMIB's nickname (where appicable by server feature, leave empty otherwise)
  •  80, $owner, nickname of the phpMIB's owner (you would set your nickname here)
  •  94, $debugActive, TRUE or FALSE (the behaviour could be changed runtime with the !debug command)
    • TRUE: show debug information to the owner
    • FALSE: don't show debug information
  •  95, $logActive, TRUE RAW or FALSE
    • TRUE: file logging in human readable format
    • RAW: log stream to file in raw format
    • FALSE: disable file logging
  •  96, $logDisplay, TRUE RAW or FALSE
    • TRUE: console output in human readable format
    • RAW: output stream to console in raw format
    • FALSE: disable console output
  •  97, $logFile, filename for the log file (saved in the phpMIB's script directory)
  • 153, $enterMsg, message sent by phpMIB entering the channel

How to load a module
Until now you can load one module at time in phpMIB. We will soon provide a full modules loader to avoid this limitation (and add other modules' management features). The modules' sources you can download from Sourceforge.net need to be added manually to the Core source in order to run them.
Follow step by step this instruction after you have downloaded phpMIB's Core and the module you want to load:
  • Create a new php file in your preferred text editor
  • Copy the Core module's source in the new php file
  • Go to line 1059 and change $phpMIB = new _phpMIB(); in $phpMIB = new _moduleClass();.
    You can desume _moduleClass from the module's source: look for the class declaration's string (something like: class _xyzBOT extends _phpMIB {), _xyzBOT is the _moduleClass you have to change.
  • Copy the source of the module you have choosen (but for the PHP open/close tags - first and last lines of the source), and paste it between lines 1056 and 1058 of the new file.
  • Save the new file with the name you prefer
  • Launch the new phpMIB's script following the instruction given above