WEBSITE MONITOR
Simple website monitoring with Telegram and email alerts.
No coding needed. Works on normal cPanel hosting.


WHAT IT DOES
- You add websites from a web page.
- It checks each website on a schedule.
- It sends a Telegram message and an email when a site goes down.
- It sends another when the site comes back up.
- It only alerts on a change, so no spam.


WHAT YOU NEED
- cPanel hosting with PHP (almost every cPanel host has this).
- A Telegram bot token and chat ID (only if you want Telegram alerts).
- An email address (only if you want email alerts).


PART 1. UPLOAD THE FILES

1. Log in to cPanel.
2. Open File Manager.
3. Go into public_html.
4. Click Upload and upload the file website-monitor.zip.
5. Back in File Manager, right click website-monitor.zip and choose Extract.
   This creates a folder called website-monitor.
6. You can delete the zip after extracting.


PART 2. OPEN THE DASHBOARD

1. In your browser, go to:
   https://YOURDOMAIN/website-monitor/
   Replace YOURDOMAIN with your real domain.
2. The first screen asks you to create a password. Pick one and continue.
   You can fill the Telegram and email fields now or later.


PART 3. ADD YOUR WEBSITES

1. On the dashboard, type a name and the website address.
2. Click Add website.
3. Repeat for as many sites as you want.


PART 4. SET WHERE ALERTS GO

1. Scroll to Alert settings.
2. Paste your Telegram bot token and chat ID.
3. Enter your alert email.
4. Click Save settings.
5. Click Send Telegram test and Send email test to confirm both work.


PART 5. TURN ON AUTOMATIC CHECKS (IMPORTANT)

The dashboard shows a single command line in the box titled
"Turn on automatic checks". It already has your domain and secret key in it.

1. In cPanel, open Cron Jobs.
2. Under Common Settings, choose "Once per five minutes".
3. In the Command box, paste the line shown on your dashboard. It looks like:
   curl -s "https://YOURDOMAIN/website-monitor/check.php?key=XXXX" >/dev/null 2>&1
4. Click Add New Cron Job.

That is it. The monitor now runs by itself, day and night, even when your
computer is off.


GETTING A TELEGRAM BOT TOKEN AND CHAT ID
1. In Telegram, search for BotFather.
2. Send /newbot and follow the prompts. It gives you a token.
3. Send any message to your new bot.
4. Open this in a browser, with your token in place:
   https://api.telegram.org/botYOUR_TOKEN/getUpdates
5. Find the number after "id". That is your chat ID.


NOTES
- The first check of each site sends no alert. It just records the status.
  Alerts start from the next change.
- If email tests fail, use a from-address on your own domain. Some hosts
  block mail sent from other domains.
- Your password and tokens are stored inside the website-monitor/data folder.
  That folder is protected from public access.
- To change anything later, just open the dashboard again and log in.
