obter o ip do servidor que esta hospedado seu scripts ou pelo ping

  1. <html>
  2. <body>
  3. <?php
  4. $ch = curl_init();
  5. curl_setopt($ch, CURLOPT_URL,‘http://www.ipchicken.com/’);
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. $contents = curl_exec ($ch);
  8. curl_close ($ch);
  9. echo “Your Server’s IP : “.$contents;
  10. ?>
  11. </body>
  12. </html>

Deixe um comentário