Advertisement
NullSet

lookup.php

Aug 1st, 2011
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <!-- This is a simple resolver designed for local use                       -->
  2. <!-- Not advised to be put on any site without adding some security features-->
  3. <!-- Coded by Null Set (1 Aug 2011)                                         -->
  4. <!-- Submitted originally to securityoverride.com                           -->
  5.  
  6.  
  7. <?php
  8. if(isset($_POST['ip'])){
  9.     $ip = $_POST['ip'];
  10.     $hostname_result = gethostbyaddr($ip);
  11.     echo $ip." has hostname ".$hostname_result."<br /><br />";
  12. }
  13. if(isset($_POST['addr'])){
  14.     $addr = $_POST['addr'];
  15.     $ip_result = gethostbyname($addr);
  16.     echo $addr." has IP ".$ip_result."<br /><br />";
  17. }
  18. ?>
  19.  
  20. <form action='' method='POST' name='ip'>
  21.     IP Address to check: <input type='text' name='ip' /><input type='submit' value='Submit!' />
  22. </form>
  23. <form action='' method='POST' name='addr'>
  24.     Hostname to check: <input type='text' name='addr' /><input type='submit' value='Submit!' />
  25. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement