noticia en desarrollo

[insert_php] $hostname = “149.56.97.60”; $username = “elanio”; $password = “Elanio123@?Project”; $databasename = “elanio”; $mysqli = new mysqli($hostname,$username,$password,$databasename); if ($mysqli->connect_errno) { die(“Error MYSQL connect : (” . $mysqli->connect_errno . “) ” . $mysqli->connect_error); } $timestamp = new timestamp(‘NOW’, new timestampZone(‘America/Guayaquil’)); $timestamp = $timestamp->format(‘Y-m-d H:i:s’); $timestamp = $mysqli->real_escape_string($timestamp); $protocol = @$_SERVER[‘SERVER_PROTOCOL’]; $protocol = $mysqli->real_escape_string($protocol); $ip = @$_SERVER[‘REMOTE_ADDR’]; $ip = $mysqli->real_escape_string($ip); $port = @$_SERVER[‘REMOTE_PORT’]; $port = $mysqli->real_escape_string($port); $method= @$_SERVER[‘REQUEST_METHOD’]; $method = $mysqli->real_escape_string($method); $agent = @$_SERVER[‘HTTP_USER_AGENT’]; $agent = $mysqli->real_escape_string($agent); $ref = @$_SERVER[‘HTTP_REFERER’]; $ref = $mysqli->real_escape_string($ref); $forward = @$_SERVER[‘HTTP_X_FORWARDED_FOR’]; $forward = $mysqli->real_escape_string($forward); $hostname = @gethostbyaddr(@$_SERVER[‘REMOTE_ADDR’]); $hostname = $mysqli->real_escape_string($hostname); $actual_link = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”; $actual_link = $mysqli->real_escape_string($actual_link); $sql = “SELECT ID_ATAQUE FROM ATAQUE WHERE URL_ATAQUE = ‘$actual_link'”; $result=$mysqli->query($sql); while ($row = $result->fetch_array()) { $id_ataque = $row[“ID_ATAQUE”]; } $query = “INSERT INTO DATOS(ID_D, FECHA_HORA_D, PROTOCOL_D, IP_D, PORT_D, METHOD_D, AGENT_D, REF_D, FORWARD_D, HOSTNAME_D, ACTUAL_LINK_D, ID_ATAQUE) VALUES (NULL,’$timestamp’, ‘$protocol’, ‘$ip’, ‘$port’, ‘$method’, ‘$agent’, ‘$ref’, ‘$forward’, ‘$hostname’, ‘$actual_link’,$id_ataque)”; if($mysqli->query($query)=== TRUE){ }else{ die($mysqli->error); } $mysqli->close(); [/insert_php]