26/07/10 18:08
Denis442
Salve, ho un problema: io ho messo all' interno del file ip.php il codice:
<?php function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'?])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARD?ED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_F?OR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>poi cosa devo fare? si può fare una cosa del tipo:
<?php include("ip.php"); $ip = getRealIpAdd(); if ($ip == "127.0.0.1") { echo("..."); } else { } ?>ho sbagliato qualcosa? Se si dove?
aaa