How to get AIR working?!!

Step 1: Download and install AIR through the installAIR.exe or just run the runAIR.exe on a internet-connected Windows PC.

Step 2: Configure AIR:
  • Server-IP - Enter the IP-address of your IRC-Server
  • Port - Enter the client port of your IRC-Server (where your guests connect to)
  • Nick - The preferred nickname of your AIR-bot (same as the username, which you have to register first!!)
  • NickSrv - Name of your NickService (most: NickServ or NickServ2)
  • Password - The password for the account (see "Nick")
  • Connect to AIR settings: Port - Select a free port on the machine, where's AIR running on
  • Connect to AIR settings: Passkey - A secret password, which your registration-script sends first to authorise.

Step 3:
  • Configure your script and run it :-) Example: see below

Step 4 (optional):
write open and above board a short review :-)

Problems? Please contact us - we'll help (if we can ;-) )

PHP Sample !

<?php
// Vars:
// $host        =   IP or hostname of the machine where`s AIR running on`
// $port        =   Port which is defined in AIR "Connecting to AIR Settings"
// $passkey     =   secret key ONLY for connecting to AIR
// $username    =   Username which AIR has to register
// $password    =   Password for given username
// $email       =   eMailaddress for given username
function register($host, $port, $passkey, $username, $password, $email)
{
    $return_string = '';
    $fp = fsockopen($host, $port, $errno, $errstr, 30);
    if (!$fp) {
        echo "$errstr ($errno)<br />\n";
    } else {
        $out  = "IDENT $passkey\r\n";
        fwrite($fp, $out); 
        $out = "saregister $username $password $email\r\n";
        fwrite($fp, $out);
        fclose($fp);
    }

    return $return_string;
}

echo register('127.0.0.1', '7777', 'my_secret_key', 'NewUser', 'userpassword', 'test@test.com');

?>

Last edited Nov 15, 2009 at 6:51 AM by AllianzManager, version 3

Comments

AaroN123 Oct 22, 2010 at 3:36 PM 
So... how would you go about changing this script into a form for users to be able to use it?