Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-viewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave <dave@techsneeze.com>2016-03-03 20:54:46 +0300
committerDave <dave@techsneeze.com>2016-03-03 20:54:46 +0300
commita7a5458e50a617771f4d169642efae23186f571c (patch)
tree84973bf3f84f992f6c069f22107ef0e1f126f560
parent3dc854bd38a8b68350c2e758365382101fb56417 (diff)
Add IPv6 support, thanks to Jeff M.
-rw-r--r--dmarcts-index.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/dmarcts-index.php b/dmarcts-index.php
index 635134f..362e7d8 100644
--- a/dmarcts-index.php
+++ b/dmarcts-index.php
@@ -90,8 +90,16 @@ while($row = mysql_fetch_array($result_rptrecord)){
} else {
$rowcolor="FFFF00"; //yellow
};
+
+ if ( $row['ip'] ) {
+ $ip = long2ip($row['ip']);
+ }
+ if ( $row['ip6'] ) {
+ $ip = inet_ntop($row['ip6']);
+ }
+
echo "<tr align=center bgcolor=". $rowcolor. ">";
- echo "<td><a name=rpt". $row['serial'].">". long2ip($row['ip']). "</td><td>". gethostbyaddr(long2ip($row['ip'])). "</td><td>". $row['rcount']. "</td><td>". $row['disposition']. "</td><td>". $row['reason']. "</td><td>". $row['dkimdomain']. "</td><td>". $row['dkimresult']. "</td><td>". $row['spfdomain']. "</td><td>". $row['spfresult']. "</td>";
+ echo "<td><a name=rpt". $row['serial'].">". $ip. "</td><td>". gethostbyaddr($ip). "</td><td>". $row['rcount']. "</td><td>". $row['disposition']. "</td><td>". $row['reason']. "</td><td>". $row['dkimdomain']. "</td><td>". $row['dkimresult']. "</td><td>". $row['spfdomain']. "</td><td>". $row['spfresult']. "</td>";
echo "</tr>";
echo "\n";
}