This script will visit up to 3 locations to obtain your external (WAN) IP address:
Provided all sites are enabled, the script will start at site 1 and work down the list until it receives a valid IP address. Normally the first site checked is sufficient to get the correct IP address. This is then stored in a virtual device.
Each time the script is run, it will check to see if your IP address has changed from that stored in the virtual device.
If a change is detected, then it will embed the new IP address in any number of text-based files (including txt, html, asp, aspx etc) and can either email, FTP or locally copy this file to a specified location. When a text-based file is used for email, the text is read from the file and converted as the message area within the email. It can also be set to send the file as an attachment, if required.
The process works by embedding tags within the original file, which is then replaced with the correct information.
Tags are available for IP address, Current Time, Current Date, Day, Week, Month and Year.
It is very easy to construct a complete web page in htm/html using a normal web page editor. Instead of adding the IP address to the text hyperlink, you just need to add the IP tag.
The script will read each file and if necessary, replace these tags with the current information. A new file with the same name (but updated) is then created & stored in a second directory. This new file is then available to be emailed, FTP’d or copied to a local or network directory by the script.
A virtual device is created showing the current WAN IP Address.
Please post your comments/suggestions here.
As always, it can be downloaded from my site. Click on my banner below.
(No Banner seen?- check your Forum Settings - User Settings, Account, Tick 'Show Signature')
- Homeseer using its own hs.wanip script command
- icanhazip.com
- checkip.dyndns.org
Provided all sites are enabled, the script will start at site 1 and work down the list until it receives a valid IP address. Normally the first site checked is sufficient to get the correct IP address. This is then stored in a virtual device.
Each time the script is run, it will check to see if your IP address has changed from that stored in the virtual device.
If a change is detected, then it will embed the new IP address in any number of text-based files (including txt, html, asp, aspx etc) and can either email, FTP or locally copy this file to a specified location. When a text-based file is used for email, the text is read from the file and converted as the message area within the email. It can also be set to send the file as an attachment, if required.
The process works by embedding tags within the original file, which is then replaced with the correct information.
Tags are available for IP address, Current Time, Current Date, Day, Week, Month and Year.
It is very easy to construct a complete web page in htm/html using a normal web page editor. Instead of adding the IP address to the text hyperlink, you just need to add the IP tag.
The script will read each file and if necessary, replace these tags with the current information. A new file with the same name (but updated) is then created & stored in a second directory. This new file is then available to be emailed, FTP’d or copied to a local or network directory by the script.
A virtual device is created showing the current WAN IP Address.
Please post your comments/suggestions here.
As always, it can be downloaded from my site. Click on my banner below.
(No Banner seen?- check your Forum Settings - User Settings, Account, Tick 'Show Signature')
Comment