-
-
Save parzibyte/863442ef7d0c7050c0b06b1c76b56779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function registrarVisita($pagina, $url) | |
{ | |
$fecha = date("Y-m-d"); | |
$ip = $_SERVER["REMOTE_ADDR"] ?? ""; | |
$bd = obtenerConexion(); | |
$sentencia = $bd->prepare("INSERT INTO visitas(fecha, ip, pagina, url) VALUES(?, ?, ?, ?)"); | |
return $sentencia->execute([$fecha, $ip, $pagina, $url]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment