- Joined
- Feb 20, 2009
- Messages
- 227
- Reaction score
- 0
Hello friends, I was wondering where I can get the script to upload Emblems clan? I can not find it anywhere, DNWeb is damaged
Give me this error:
and this is my sec.php:
NEED HELP PLEASE!
Give me this error:
Code:
[COLOR=Black][B]Fatal error[/B]: Cannot redeclare writetologfile() (previously declared in C:\AppServ\www\emblem\sec.php:3) in [B]C:\AppServ\www\emblem\sec.php[/B] on line [B]27[/B][/COLOR]
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);
}
}
/////////////////////////////
function anti_injection($sql)
{
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
$sql = trim($sql);
$sql = strip_tags($sql);
$sql = addslashes($sql);
return $sql;
}
/////////////////////////////
function valida($campos){
foreach($campos as $c){
if(empty($c)){
echo ":: You have attempt to SQL inject. Log saved and sended to the webmaster ::<br />";
$time = date("M j G:i:s Y");
$ip = getenv('REMOTE_ADDR');
$userAgent = getenv('HTTP_USER_AGENT');
$referrer = getenv('HTTP_REFERER');
$query = getenv('QUERY_STRING');
$msg = "IP: " . $ip . " TIME: " . $time . " REFERRER: " . $referrer . " SEARCHSTRING: " . $query;
writeToLogFile($msg);
return false;
}else{
return true;
}
} }
?>
NEED HELP PLEASE!