killsite Posted February 27, 2008 Share Posted February 27, 2008 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 More sharing options...
rhodesa Posted February 27, 2008 Share Posted February 27, 2008 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 More sharing options...
killsite Posted February 27, 2008 Author Share Posted February 27, 2008 tyvm. ~resolved Link to comment https://forums.phpfreaks.com/topic/93356-php-mailer-script/#findComment-478351 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.