1
xsell
Include webmaster email
  • 2009/6/3 4:27

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 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.
<?php
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 :)

2
optikool
Re: Include webmaster email
  • 2009/6/9 6:26

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


Hi xsell,

Are you asking how to covert this script to send in XOOPS or do you just need to know how to get the admin email? If you need to just get the admin email try using $xoopsConfig['adminmail'] to get the email address.

Optikool

Login

Who's Online

152 user(s) are online (100 user(s) are browsing Support Forums)


Members: 1


Guests: 151


Farell,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits