good, my question is the following as I can do to make a script in php that at the time of taking the screenshot I modified the name and I did not change the image already saved .. my code is as follows:
<?php
function reporte($i){
require ('config.php');
$i++;
$Nombre = "Reporte".$i;
$guardado = "../img/".$Nombre.".jpeg";
$img = imagegrabscreen();
$destino_1 = imagejpeg($img,$guardado);
$conexion = mysqli_connect($db_host,$db_user,$db_pass);
if (mysqli_connect_errno()) {
echo "Fallo al conectar con la Base de Datos.";
exit();
}
mysqli_select_db($conexion, $db_bd) or die ("No se encontro la Base de Datos");
mysqli_set_charset($conexion, "utf8");
$guardar= "INSERT INTO img (ID, Nombre, Lugar) VALUES (0, '$Nombre', '$guardado') ";
$resultado=mysqli_query($conexion,$guardar);
mysqli_close($conexion);
sleep(30)
return $Nombre();
}
while (true) {
$i(2);
}
?>
Well the truth is I'm not very good at php but what little I know and what I researched is what I do, and I've already searched several pages but I do not get anything. What do I want to do with my script so I take a screen capture every 15min and I save the photo in the database, in this case I just saved the path so as not to occupy much space in the database, but I get an error time to use the sleep () and when I save the photo it replaces the previous one that I had already taken. in advance thank you very much