warning when determining MX records of a domain.
This commit is contained in:
parent
5fb83cec32
commit
d9dae47ae0
1 changed files with 8 additions and 3 deletions
|
@ -543,10 +543,15 @@
|
||||||
#echo `dig +short mx heise.de 2>&1`."-<br>\n";
|
#echo `dig +short mx heise.de 2>&1`."-<br>\n";
|
||||||
|
|
||||||
$list = explode("\n", $line);
|
$list = explode("\n", $line);
|
||||||
foreach($list as $row)
|
foreach($list as $row) {
|
||||||
list($pri, $mxhosts[]) = explode(" ", substr(trim($row), 0, -1));
|
if(!strstr($row, " ")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list($pri, $mxhosts[]) = explode(" ", trim($row), 2);
|
||||||
|
}
|
||||||
$mxhosts[] = $domain;
|
$mxhosts[] = $domain;
|
||||||
#print_r($mxhosts); die;
|
array_walk($mxhosts, function(&$mx) { $mx = trim($mx, '.'); } );
|
||||||
|
|
||||||
foreach($mxhosts as $key => $domain)
|
foreach($mxhosts as $key => $domain)
|
||||||
{
|
{
|
||||||
$fp = @fsockopen($domain,25,$errno,$errstr,5);
|
$fp = @fsockopen($domain,25,$errno,$errstr,5);
|
||||||
|
|
Loading…
Reference in a new issue