]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/resolver.class.php
useProxy is duplicate, because isProxyUsed() is cached, fixed bug in IP resolver...
[mailer.git] / inc / classes / resolver.class.php
index 190111b946999f9dc908196de7727ce3281b651e..47805bde3cfc2af67c18298d344fa75ccf4c9835 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -83,6 +83,7 @@ class HostnameResolver {
                } else {
                        // Get IP address
                        $ip = gethostbyname($hostname);
+                       //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'ip=' . $ip . ',hostname=' . $hostname . ' - RESOLVED!');
 
                        // Count lookup hit
                        incrementStatsEntry('dns_lookup_hits');
@@ -97,6 +98,7 @@ class HostnameResolver {
 
                                        // Set return value to $ip
                                        //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("IP detected, cache entry written: %s->%s", $hostname, $ip));
+                                       $ret = $ip;
                                } else {
                                        // Network address or broadcast address found
                                        //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("IP %s is possibly a network or broadcast address.", $ip));
@@ -118,7 +120,7 @@ class HostnameResolver {
                // Free result
                SQL_FREERESULT($result);
 
-               // Return IP number (let's hope it!
+               // Return IP number (let's hope it)
                return $ret;
        }