From b73884be614d8cc87ff7b85b21c371be0d36cb57 Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 14 Jul 2016 13:18:06 +0800 Subject: [PATCH] NotifySmtpCheck.php --- NotifySmtpCheck.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NotifySmtpCheck.php b/NotifySmtpCheck.php index 4688f367..ce350db3 100644 --- a/NotifySmtpCheck.php +++ b/NotifySmtpCheck.php @@ -27,8 +27,14 @@ class Pman_Core_NotifySmtpCheck extends Pman return; } - $ip = file_get_contents("https://ifconfig.co/"); - print_R($ip);exit; + $ifconfig = file_get_contents("https://ifconfig.co/"); + $dom = new DomDocument('1.0', 'utf-8'); + $dom->loadHTML($ifconfig); + $xpath = new DOMXPath($dom); + $lists = $xpath->query("code[@class='ip]"); + + + print_R($lists);exit; $error = array(); -- 2.39.2