Simple thing ever to fix x.x
here wee go.
First create a logs folder u will need it. name : logs
Code:
/////////////////////////////
function writeToLogFile($msg)
{
// $today = date("M j G:i:s Y");
$today = date("Y_m_d");
$logfile = "./logs/".$today."_log_SQL INJECTIONS.txt";
$dir = '';
$saveLocation=$logfile;
$fp = @fopen( $saveLocation,"r");
$Data = @fread($fp, 800000);
if (!$handle = @fopen($saveLocation, "w+b"))
{
echo "error";
exit;
}
else
{
if(@fwrite($handle,"$msg\r\n SQL Injection detected\r\n$Data")===FALSE)
{
echo "geen error";
exit;
}
@fclose($handle);
}
}