memCache = new Memcache; } } function memConnect($pCon = 0, $server = '';){ /* -------------------------------------- Our function to connect to the memcache server. We will go ahead and get our server IP address from our serverArray and port from portArray. If failure to connecting to server, it will try next sever in the array. If pcon is set to true, it will then open up a pressitent connection. If server is supllied it will connect with that server. We Will check to see if the server is an IP or index value for the serverArray. --------------------------------------*/ if(!empty($server)){ if(is_numeric($server)){ // index from serverArray }else{ // use custom IP , we will do an // explode to see if there is a port $serverData = explode(':',$server); $server = $serverData[0]; if(!empty($serverData[1]){ }else{ } } }else{ // ok grab one from the serverArray } } function p_error($err,$sql = ""){ switch($err){ case 0: // custom error $err = "0 - " . date("m-j-y") . " Custom Error: " . $sql; write_error("CACHER",$err); break; default: break; } } function __destruct(){ } } ?>