diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/dyndns.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index fc06303..75bc749 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -853,8 +853,10 @@ $ip_ch = curl_init('http://checkip.dyndns.org'); curl_setopt($ip_ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ip_ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ip_ch, CURLOPT_SETINTERFACE, $this->_dnsIP); + if ($this->_dnsIP <> "" || $this->_dnsIP <> "0.0.0.0") + curl_setopt($ip_ch, CURLOPT_SETINTERFACE, $this->_dnsIP); $ip_result_page = curl_exec($ip_ch); + curl_close($ip_ch); $ip_result_decoded = urldecode($ip_result_page); preg_match('=Current IP Address: (.*)</body>=siU', $ip_result_decoded, $matches); $ip_address = trim($matches[1]); |