SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | set_time_limit(0); | |
3 | ignore_user_abort(true); | |
4 | header('Content-Type: text/html; charset=UTF-8'); | |
5 | ||
6 | $dbs = glob("whitebot/*.txt", GLOB_NOSORT); | |
7 | ||
8 | foreach ($dbs as $db) { | |
9 | $ip = basename(trim($db), ".txt"); | |
10 | //$ip = explode('.', $ip); | |
11 | //unset($ip[3]); | |
12 | //$ip = implode('.', $ip).'.1'; | |
13 | $hostname = gethostbyaddr($ip); | |
14 | $ip2 = gethostbyname($hostname); | |
15 | if ($ip != $ip2) { | |
16 | echo '<span style="color:red;">'.$ip.' '.$ip2.' '.$hostname.'</span><br>'; | |
17 | } else { | |
18 | echo '<span style="color:green;">'.$ip.' '.$ip2.' '.$hostname.'</span><br>'; | |
19 | } | |
20 | } | |
21 | ||
22 | echo 'ok'; |