برای مشاهده ویدئوی این درس می بایست در دوره ثبت نام نمائید.
کدهای نهایی:
<?php
$secret=null;
if(isset($_GET['secret']))
{
$secret=$_GET['secret'];
}
else
{
parse_str($argv[1]);
}
if($secret!=123)
{
return;
}
/*
twzFileWatch example script
http://tweezy.net.au/filewatch.html
*/
# 1. The class file must be attached..
######################################
require('twzFileWatch.class.php');
# 2. Set variables to suit your requirements..
##############################################
$SiteName = 'welearn';
$CheckFolder = '../public_html/';
$RecurseLevel = 999;
$EmailTo = 'gddhznuyuy@nowmymail.com';
# 3. Instantiate the class..
############################
$fw = new twzFilewatch($SiteName, $CheckFolder, $RecurseLevel, $EmailTo);
# 4. Set the required options..
###############################
# use saveFile() to set the location of the save-file (location must be writable)
$fw->saveFile('./log.txt');
# for testing in a browser, set doSendEmail(false), so the result will be
# echoed and no email will be sent. You might also want to set reportAlways(true)
# so you will see a result even if no change is detected.
$testing=true;
if($testing)
{
$fw->doSendEmail(true);
$fw->reportAlways(true);
$fw->minInterval('5 seconds');
}
# 5. Do it!..
########################
$fw->checkFiles();
?>

نظرات دوره آموزش مجازی جامع مانیتورینگ سایت و ردیابی هکرها