Download and install AIR through the installAIR.exe or just run the runAIR.exe on a internet-connected Windows PC.
<?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');
?>