/viewNotifier

I implemented this PHP script to receive the IP address of the people that visit my website.

Primary LanguagePHP

In order to use this PHP snippet you need to have:

  1. a working BOT for telegram. (add @BotFather to your telegram and follow the instructions to create your bot and acquire the API TOKEN).
  2. A Telegram API TOKEN ( see previous point)
  3. The chat ID of your conversation with the BOT.
    You can get it from here: https://api.telegram.org/bot{REPLACE WITH YOUR BOT API TOKEN}/getUpdates ex. https://api.telegram.org/bot9345924:5TGnkslav03anmsclakzXc/getUpdates

Place the snippet in the pace you would like to track and change the value of the variables: $token and $chat_id with your values.

Enjoy.

If someone asks why whould I like to have a notifier for the visits of my website. Well, I've been under hacker attack recently and to know the IP of the attacker at the moment of the attack was quite useful.