[insert_php]
$servername = “192.168.30.27”;
$username = “conexintranet”;
$password = “repasote”;
$dbname = “auxilconexintranetweb”;
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
$sql = “SELECT ip FROM docscongreso_ip”;
$sql2 = “Select ip from docscongreso_ip where ip='”.$_SERVER[‘REMOTE_ADDR’].”‘”;
$result = $conn->query($sql2);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
//echo “ip: ” . $row[“ip”]. “
“;
//No hacemos nada, ya había entrado previamente
}
} else {
//echo “0 results”;
//redirigimos al registro de datos
header(‘Location: http://www.aidimme.es/congresohabitat/documentacion.asp’);
exit;
}
$conn->close();
[/insert_php]
|
Impactos: 32