note 40767 deleted from ref.mail by nlopess
| From: | nlopess@php.net | Date: | Sun, 14 Mar 2004 10:27:13 +0000 |
| Subject: | note 40767 deleted from ref.mail by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66814@lists.php.net to get a copy of this message | ||
Note Submitter: Elvis Cat
----
You can use the following code to have your site send you an e-mail when you get a hit, and check
the whois for the IP address of the hit.
$current_date = date("F j, Y, g:i a");
$message = "From <a href='http://www.dnsstuff.com/tools/whois.ch?ip="
. $_SERVER['REMOTE_ADDR'] . "'>" . $_SERVER['REMOTE_ADDR'] .
"</a> at " . $current_date;
mail("webmaster@yoursite.com", "Hit",$message,
"From: website@{$_SERVER['SERVER_NAME']}\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-type: text/html; charset=iso-8859-1\r\n" .
"X-Mailer: PHP/" . phpversion());