Notify when the WAN IP has changed and send the new IP via a Telegram Bot.
Via PHP CLI:
$ php wan-ip-notifier.php <bot_token> <chat_id> [<wan-ip-history.csv>]
Or, when calling via HTTP, set the appropriate headers:
$ curl --request GET \
--url http://localhost/wan-ip-notifier.php \
--header 'x-bot-token: <bot_token>' \
--header 'x-chat-id: <chat_id>'
Add the following (with your timing preference) to your crontab ($ crontab -e
):
* * * * * php /path/to/wan-ip-notifier.php <bot_token> <chat_id>