{ Business Solutions for the Enterprise }
|
|
|
MX Lookup
Look up the mail server records for any domain.
Primary and Secondary servers will be returned.
if($_POST["repeat"]==1){
?>
Mail Server(s):
getmx($hostname);
?>
} else {
?>
}
?>
|
|
Designed by Markus Diersbock
include($_SERVER["DOCUMENT_ROOT"]."/includes/footer.php");
function getmx($host){
if(!getmxrr($host, $aryhosts, $aryweights)){
echo "No MX record(s) returned! ";
} else {
$arynew=array_merge_assoc($aryweights, $aryhosts);
foreach ($arynew as $key => $value){
echo "".$key." - ".$value." ";
}
}
}
function array_merge_assoc($keyarray, $valuearray){
$i=0;
foreach($keyarray as $element){
$aryreturn[$element]=$valuearray[$i++];
}
return $aryreturn;
}
?> | | |