Files
Testing/mailservices/ipaddresses.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

56 lines
1.0 KiB
PHP

<?php
$em="";
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/includes/');
include(PATHTOINCLUDES."base.php");
$dconn=dbconnect();
$sql="SELECT
`ip_identity`.`id`,
`ip_identity`.`ip`,
`ip_identity`.`domain`
FROM
`ip_identity`
";
$result= mysql_query($sql) or $em=$em.mysql_error();
$rownum=0;
while ($row = mysql_fetch_assoc($result)) {
$rownum=$rownum+1;
if($rownum % 2 != 0){$rc="#ffff99";} else{$rc="#fff";}
echo $row["ip"]." - ";
$hname=gethostbyaddr ( $row["ip"]);
if($hname != $row["ip"])
{
echo $hname;
@$resultdns = dns_get_record($hname);
var_dump($resultdns);
$hosts = gethostbynamel($hname);
if (is_array($hosts)) {
echo " Host ".$hname." resolves to:<br><br>";
foreach ($hosts as $ip) {
echo "IP: ".$ip."<br>";
}
} else {
echo "Host ".$hname." is not tied to any IP.";
}
}
echo "<br /><br />";
}
@$resultdns = dns_get_record('hostica.com');
var_dump($resultdns);
echo gethostbyname ( 'mail.kcassociatesinc.com');
//mail.kcassociatesinc.com
?>