1
Hello
I have a PHP code with 0 knowladge of php :), this code send email to the webmaster to any one Visits the code file.
i need to edit this code so it sends the email to my XOOPS webmaster without having to edit and insert the email manualy into the code ..
this is the code.
if(phpversion() >= "4.2.0") {
extract($_SERVER);
}
$visitor = 0;
$datname = "../.visits.txt";
if ($visitor == 0)
{
/* send a mail to hostmaster */
$tmestamp = time();
$datum = date("Y-m-d (D) H:i:s",$tmestamp);
$from = "info @ yourmail.com";
$to = "me @ home.org";
$subject = "u have Visit";
$msg = "A Visit Hit $REQUEST_URI $datum n";
$msg .= "His Address is $REMOTE_ADDR, agent is $HTTP_USER_AGENTn";
mail($to, $subject, $msg, "From: $from");
///
$fp = fopen($datname,'a+');
fwrite($fp,"ndeny from $REMOTE_ADDRn");
fclose($fp);
}
?>
thx in advance for who reads this and much thx to who Reads and can help :)