i am messing with my website, then i thought why not add a visitor mail notification to myself. I added Following Code to my website using
include("visit_mail.php");
but even if my website have 1 visit i receive 20 emails from x-mailer. here is the code of x-mailer
$browser = $_SERVER['HTTP_USER_AGENT'];
$time = date("g.i A l-d F Y", time() + 6*60);
$ip=getenv('REMOTE_ADDR');
$email_me= "me@mydomain.com";
$msg = "\nHey SomeOne Visited Your WebSite\nIP: $ip\nBrowser:$browser\n$time.";
$subject = "Visitor On $site_name";
$headers = 'From: me@mydomain.com' . "\r\n" .
'Reply-To: me@mydomain.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
'X-Priority: 1\n'.
'Priority: Urgent\n'.
'Importance: high';
$x =mail($email_me, $subject, $msg, $headers);
if($x){echo "";}else{echo "";}