ZERO && empty($key)) { log_message::info("is Data array "); return $object; } if (is_array($object) && !empty($key) && isset($object[$key]) && !empty($object[$key])) { log_message::info("is Data array key "); return $object[$key]; } log_message::info("data is null", $key); return false; } function isPrimary($object) { return is_null($object) || is_bool($object) || is_string($object) || is_numeric($object); } function isSetData() { } function get_server_ip() { if (!empty($_SERVER['SERVER_ADDR'])) return $_SERVER['SERVER_ADDR']; $result = shell_exec("/sbin/ifconfig"); if (preg_match_all("/addr:(\d+\.\d+\.\d+\.\d+)/", $result, $match) !== 0) { foreach ($match[0] as $k => $v) { if ($match[1][$k] != "127.0.0.1") return $match[1][$k]; } } return false; } function getIp() { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $ip = getHostByName(php_uname('n')); return $ip; } else { return get_server_ip(); } } // spl_autoload_register("anshee_autoload");