georgebaker Posted November 8, 2013 Share Posted November 8, 2013 (edited) I'm new to PHP.I just want to ask if it's possible to make a php script that will sent me a email when someone visit a specific website(my own). If you could point in the right direction on how to code it, it would be great. Maybe there's already some script out there that can do that. Thank you in advance. Edited November 8, 2013 by georgebaker Quote Link to comment https://forums.phpfreaks.com/topic/283730-newbee-question/ Share on other sites More sharing options...
cyberRobot Posted November 8, 2013 Share Posted November 8, 2013 As in visiting a specific page...or if someone visits any page on a website? It might also help if you provide a little more information on what you're trying to accomplish. To be honest, getting an email every time someone visits a page seems inefficient. If you're just interested in knowing how people visit the website, you could utilize something like Google Analytics: http://www.google.com/analytics/ Quote Link to comment https://forums.phpfreaks.com/topic/283730-newbee-question/#findComment-1457580 Share on other sites More sharing options...
georgebaker Posted November 8, 2013 Author Share Posted November 8, 2013 (edited) As in visiting a specific page...or if someone visits any page on a website? It might also help if you provide a little more information on what you're trying to accomplish. To be honest, getting an email every time someone visits a page seems inefficient. If you're just interested in knowing how people visit the website, you could utilize something like Google Analytics: http://www.google.com/analytics/ Visit a specific page e.g. supportlab.dk/optimization I want to see whenever someone is on the url above and want the script to sent me a mail that someone have been there. I want to see that e.g. on johnnylai.me/test (where the script are) I use Google Analytics but i think it's overkill here. Edited November 8, 2013 by georgebaker Quote Link to comment https://forums.phpfreaks.com/topic/283730-newbee-question/#findComment-1457582 Share on other sites More sharing options...
cyberRobot Posted November 8, 2013 Share Posted November 8, 2013 Have you looked into the mail() function? http://php.net/manual/en/function.mail.php You could formulate a message on the page of interest. Quote Link to comment https://forums.phpfreaks.com/topic/283730-newbee-question/#findComment-1457584 Share on other sites More sharing options...
georgebaker Posted November 8, 2013 Author Share Posted November 8, 2013 I will take a look at it thanks cyberRobot. Quote Link to comment https://forums.phpfreaks.com/topic/283730-newbee-question/#findComment-1457586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.