After actually 3 weeks I finally got the answer with some research and I got this which is quite working. The answers mention above mine are also quite correct but actually I was just trying to do something unique and wanted to learn new things.
Here is the code for Modify notify option.
$emailnotify = 1;
//Log attacks in file, 1 to yes, 0 to no
$logfile = 1;
//Log attacks in system log mechanism or server, 1 to yes,
//0 to no
$logsys = 0;
// if set to 1, sleep the application for several minutes
$anti_attack = 0;
$sleep_time = 5;
//minute