Advertisement
dragondevile

Untitled

Apr 6th, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2. echo "<h2>Server info</h2>";
  3.  
  4. $baseurl=$_SERVER['SERVER_NAME'];
  5.  
  6. echo "You're accessing: " . $baseurl . "<br>"; //or $_SERVER['HTTP_HOST'] . "<br>"; //or $_SERVER['SERVER_NAME']
  7.  
  8. echo "This server's Ip: " . $_SERVER['SERVER_ADDR'] . "<br>";
  9.  
  10. echo "This server's hostname: ";
  11. if (function_exists('gethostname')) {
  12. echo gethostname() ;
  13. } else {
  14. //for php < 5.3
  15. echo php_uname('n');
  16. }
  17. echo "<br><br>";
  18.  
  19. //get baseurl to direct customer to testing info
  20. echo "Test this domain here: <a href=http://" . $baseurl . ">" . $baseurl . "</a>";
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement