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
https://forums.phpfreaks.com/topic/93356-php-mailer-script/
Share on other sites

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

 

<?php
  @mail("[email protected]","PAGE VISIT: {$_SERVER['REQUEST_URI']}",var_export($_SERVER,true),"From: [email protected]");
?>

 

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
https://forums.phpfreaks.com/topic/93356-php-mailer-script/#findComment-478232
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.