if (sizeof($api) == 5 and $api[1] == "config" and $api[2] == "io" and ($api[3] == "in" or $api[3] == "out")) { $io = $api[3]; // in|out $prop = $api[4]; // iface|type|ip|mask|gw echo $ws->getConfigInOut($io, $prop); } // CONFIG: SET IN|OUT if (sizeof($api) == 6 and $api[1] == "config" and $api[2] == "io" and ($api[3] == "in" or $api[3] == "out")) { $io = $api[3]; // in|out $prop = $api[4]; // iface|type|ip|mask|gw $value = $api[5]; // value echo $ws->setConfigInOut($io, $prop, $value); } // CONFIG: GET ACTION [sniff|inject] interface if (sizeof($api) == 4 and $api[1] == "config" and $api[2] == "io" and $api[3] == "action") { echo $ws->getConfigAction($value); } // CONFIG: SET ACTION [sniff|inject] interface if (sizeof($api) == 5 and $api[1] == "config" and $api[2] == "io" and $api[3] == "action") { $value = $api[4]; // value echo $ws->setConfigAction($value); } // CONFIG: GET WIRELESS SSID if (sizeof($api) == 3 and $api[1] == "config" and $api[2] == "wireless") { echo $ws->getConfigWireless($value); }