Beispiel #1
0
 function DNSLookUP()
 {
     $starttime = IniGetMicroTime();
     $ip = @gethostbyname($this->host);
     if ($ip) {
         $this->ip = $ip;
     } else {
         $this->error("Hostname " . $this->host . " could not be resolved");
         return DNS_LOOKUP_ERR;
     }
     $this->dns_laptime = round(IniGetMicroTime() - $starttime, 3);
     if ($this->dns_laptime > DNS_LOOKUP_TIMEOUT) {
         return DNS_LOOKUP_TIMEOUT_ERR;
     }
     return OK;
 }
Beispiel #2
0
 function CloseLog($msg)
 {
     if ($this->log == "false") {
         return;
     }
     $laptime = IniGetMicroTime() - $this->starttime;
     $this->WriteLog(INFO, "END " . $this->type . " " . $msg . " Laptime:[" . round($laptime, 3) . "sec]");
     $this->WriteLog(INFO, "===============================================================");
     fclose($this->handle);
 }