$fecha=Date("d-m-Y"); $hora=Date("h:i:s"); $nom=getenv('REMOTE_USER'); $navegador=getenv('HTTP_USER_AGENT'); $pantalla=getenv('HTTP_UA_PIXELS'); $anterior=getenv('HTTP_REFERER'); if ($for = getenv('HTTP_X_FORWARDED_FOR')) { $afor = explode(",", $for); $ip=trim($afor[0]); } else { $ip=getenv('REMOTE_ADDR'); } include("config/conexvisites.phtml"); $link=Conectarse(); mysql_query("insert into visites (nom,ip,data,hora,navegador,pantalla,anterior) values ('$nom','$ip','$fecha','$hora','$navegador','$pantalla','$anterior')",$link); mysql_close($link); ?>