anerDev

Untitled

Feb 24th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. $ipint = $_SERVER['SERVER_ADDR'];
  4. $ipext = file_get_contents('http://phihag.de/ip/');
  5.  
  6. $ipclient = explode(".", $_SERVER['REMOTE_ADDR']);
  7.  
  8. if ($ipclient[0] == 192) {
  9.     $piip = $ipint;
  10.     }
  11.         else {
  12.             $piip = $ipext;
  13.     }; 
  14.    
  15. ?>
  16.  
  17. <html>
  18.  
  19. <head>
  20.  
  21. <title>Pi</title>
  22. <meta charset="UTF-8">
  23.  
  24. </head>
  25.  
  26. <body>
  27.  
  28. <h1 align="center">Pi</h1>
  29. <h5 align="center">
  30.  
  31. IP interno: <a href="<?php echo $ipint ?>"><?php echo $ipint ?></a>
  32. |
  33. IP esterno:
  34.  
  35. </h5>
  36. <hr />
  37.  
  38. <h4>Service:</h4>
  39.  
  40. <ul>
  41.     <li><a href="<?php echo $ipint ?>:9091/">Transmission</a></li>
  42.     <li><a href="">Downloads folder</a></li>
  43.     <li><a href="">Dashboard</a></li>
  44. </ul>
  45.  
  46. </body>
  47.  
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment