NotifySmtpCheck.php
[Pman.Core] / NotifySmtpCheck.php
index 35aa7b6..cf87c78 100644 (file)
@@ -33,10 +33,21 @@ class Pman_Core_NotifySmtpCheck extends Pman
         
         $xpath = new DOMXPath($dom);
         
-        $lists = $xpath->query("code[@class='ip]");
+        $element = $xpath->query("//code[@class='ip']");
         
+        if(!$element->length){
+            return;
+        }
+        
+        $ip = $element->item(0)->nodeValue;
+        
+        $cmd = "host {$ip}";
+        
+        $e = `$cmd`;
+        
+        $helo = substr(array_pop(explode(' ', $e)), 0, -1);
         
-        print_R($lists);exit;
+        print_R($helo);exit;
         
         $error = array();