Ver Mensaje Individual
  #7 (permalink)  
Antiguo 06/05/2010, 13:50
Avatar de Nekeniehl
Nekeniehl
 
Fecha de Ingreso: julio-2009
Ubicación: Berlin, Alemania / Granada, España
Mensajes: 132
Antigüedad: 14 años, 10 meses
Puntos: 6
Respuesta: Detectar ip visitante a formulario y enviarlo a un correo

Relajate man xD
Código PHP:
function pillarip(){
if (
$_SERVER) {  
      if ( 
$_SERVER["HTTP_X_FORWARDED_FOR"] ) {  
           
$realip $_SERVER["HTTP_X_FORWARDED_FOR"];  
       } elseif ( 
$_SERVER["HTTP_CLIENT_IP"] ) {  
           
$realip $_SERVER["HTTP_CLIENT_IP"];  
       } else {  
           
$realip $_SERVER["REMOTE_ADDR"];  
       }  
    } else {  
       if ( 
getenv'HTTP_X_FORWARDED_FOR' ) ) {  
          
$realip getenv'HTTP_X_FORWARDED_FOR' );  
       } elseif ( 
getenv'HTTP_CLIENT_IP' ) ) {  
          
$realip getenv'HTTP_CLIENT_IP' );  
       } else {  
          
$realip getenv'REMOTE_ADDR' );  
       }  
   }  
return 
$realip;
mail  (  string $to  ,  string $subject  ,  pillarip() );

no lo e probao y lo mismo me colao de listo, pruebalo cuando puedas y nos dices
suerte