Commit f9a21023e95eff4d6bd4f6cd66de26314f4f3526

Authored by Edmar Moretti
1 parent 879c6d3c

Detecção do IP no testainstal.php

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
testainstal.php
... ... @@ -60,8 +60,15 @@ error_reporting(E_ALL);
60 60  
61 61 //echo "<pre>\n";
62 62 echo "<b>TESTE DE INSTALACAO DO i3Geo</b><br>\n";
  63 +//ip
  64 +$ip = "UNKNOWN";
  65 +if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
  66 +else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
  67 +else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
  68 +else $ip = "UNKNOWN";
  69 +echo "Seu endereço IP: ".$ip."<br>\n";
63 70 echo getcwd();
64   -//echo "<br>SERVER_SOFTWARE: ".$SERVER_SOFTWARE."<br>";
  71 +
65 72 echo "<br><br>PHP (a vers&atilde;o deve ser a 5x): ";
66 73 echo "<br>".phpversion()."<br>\n";
67 74 include("classesphp/carrega_ext.php");
... ...