Web Page Notification Script
Requirements
This script uses the PHP programming language and its built in mail function which is standard on most commercial web hosting providers. The script must be placed on a page ending with .php in order to function.
Installation instructions
- Cut and paste the contents of page_visit_notification.php into the page you would like to receive notices about.
- Change the variable $EmailAddress from youremailaddress@yourdomain.com to your email address.
How it works
Each time the page with this script installed is loaded, it will send an email to your specified address detailing:
- Site Visited: Your website domain name (www.yourwebsite.com). This is useful if you are using the script on multiple sites at once.
- Viewed Page: The actual page that triggered the email (www.yourwebsite.com/yourpage.php). This is useful if you have installed the script on multiple pages.
- IP Address: The IP address of the visitor that triggered the script. With a user’s IP address, you can look up information detailing their service provider, geographic location, etc.
- Referrer: If the user that visited your site followed a link or was referred by another source, it will be reflected here. If the user followed a bookmark, typed the address into their browser, or otherwise has not referrer, it will be blank.
- User Agent: This field includes details about the visitor’s web browser. This is useful in distinguishing bots and automated visitors from real people.
Suggested Uses
This script is useful because it provides a real-time alert whenever your specified page is visited. It can be used to judge the effectiveness of a marketing campaign, or alert you to the amount of traffic one page is receiving.
Try printing the location of a hidden page on the back of your business cards. You’ll get a notification each time someone visits the page, and you’ll know how many people are taking the time to visit your site from your business cards.