This is a side project that I developed because I was hosting a server at my house on a dynamic IP.
The project outcomes were:
- Develop a PHP script to check the IP of my home server
- Allow the program to email me alerting me if the IP changed
- Schedule the script to run automatically via cron job
- Find your IP address for your home server currently
- Download and place "class.phpmailer.php" and "class.smtp.php" in your directory. No editing should be required.
- Download and edit the "servercheck.php" file with your information
- Add the follow cron job to your server (NOTE: The below code will run every minute of the day adjust as necessary)
* * * * * /usr/bin/php /var/www/servercheck.php > /dev/null
- PHPMailer Sourceforge Project - A link to the full download a files