Jump to content

php mailer script


killsite

Recommended Posts

I have two sites that are supposed to be 'unknown' to the world and I was just curious to know if anybody has ever written a script to send an email when someone visits a page they have the script configured on. Sure I can just go into whatever statistics application I have installed but again since I don't get any visits I'd rather not bother. I'd only like to do that when someone other than myself or a robot goes to the site/page.

 

Again, nobody knows about the site. Not even google (hopes at least  ;)) so this is the reason why. If this type of script exists, I'd like to know so if anybody has a generic script or knows of one that would work to do just that alone, it would be great.

Link to comment
Share on other sites

on the pages you want to be notified about, put this line:

 

<?php
  @mail("youremail@domain.com","PAGE VISIT: {$_SERVER['REQUEST_URI']}",var_export($_SERVER,true),"From: noreply@yourdomain.com");
?>

 

Replace the first & second emails with what you want. It will email you a dump of $_SERVER with contains all sorts of info about the person visiting the page.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.