{"id":36902725,"url":"https://github.com/arturo-source/check-webpage-change","last_synced_at":"2026-01-12T15:49:16.273Z","repository":{"id":163898757,"uuid":"447375544","full_name":"arturo-source/check-webpage-change","owner":"arturo-source","description":"A really simple php script to notify html changes in static pages","archived":false,"fork":false,"pushed_at":"2022-01-16T12:30:08.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-27T20:09:15.400Z","etag":null,"topics":["bot","change-detection","easy-to-use","html","simple","telegram","telegram-bot","xpath"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arturo-source.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-12T21:26:42.000Z","updated_at":"2022-01-16T12:42:12.000Z","dependencies_parsed_at":"2023-06-19T07:16:44.180Z","dependency_job_id":null,"html_url":"https://github.com/arturo-source/check-webpage-change","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.4285714285714286,"last_synced_commit":"ca1f8e922b7bab613ee59a9ad931fa7c60438726"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arturo-source/check-webpage-change","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturo-source%2Fcheck-webpage-change","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturo-source%2Fcheck-webpage-change/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturo-source%2Fcheck-webpage-change/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturo-source%2Fcheck-webpage-change/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturo-source","download_url":"https://codeload.github.com/arturo-source/check-webpage-change/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturo-source%2Fcheck-webpage-change/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","change-detection","easy-to-use","html","simple","telegram","telegram-bot","xpath"],"created_at":"2026-01-12T15:49:15.210Z","updated_at":"2026-01-12T15:49:16.262Z","avatar_url":"https://github.com/arturo-source.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check webpage changes\n### A really simple php script to notify html changes in static pages\n\nHave you ever wanted to be aware of the changes of a website? You may want to see how the price of a product that interests you evolves, or you know what changes you want to see!\n\nWith this simple script you can do it in just a few seconds. Let's look at the simple steps to configure the script. All you have to do is to set up `settings.json` file.\n\nFirst, you need to have installed PHP interpreter, and crontab on your computer or your server.\n\n### Variables\n\nThe variables you'll need to change are:\n```\n{\n  \"url\": \"\",\n  \"check_changes\": true,\n  \"notify_telegram\": true,\n  \"chat_id\": \"\",\n  \"bot_token\": \"\",\n  \"xpaths\": {\n    \"Price\": \"/html/body/main/div[4]/.......\",\n    \"Units for sale\": \"/html/body/main/div[4]/.......\",\n    \"Page Title\": \"/html/head/title\"\n  }\n}\n```\n- url **(required)**\n- xpaths **(required)**\n- chat_id (optional, for telegram notify)\n- bot_token (optional, for telegram notify)\n\nGet `url` is very easy, you can copy it from the top of the browser.\nGet `xpaths` is a little harder, once you're in the webpage, you have to right click on it. Then you select \"Inspect\" option. Then, you'll see an arrow item as next one (left):\n\n![Selector](https://github.com/arturo-source/check-webpage-change/blob/main/images/selector.png)\n\nNow you have to select the html item in the webpage, left click on that.\n\n![HTML selected](https://github.com/arturo-source/check-webpage-change/blob/main/images/html-selected.png)\n\nThen, the html code will have been marked, so your last step is to right click on it, and select \"Copy\" \u003e \"XPath\"\n\n![Copy Xpath](https://github.com/arturo-source/check-webpage-change/blob/main/images/copy-xpath.png)\n\nThe final step is pasting it on json settings `\"Price\": \"/html/body/main/div[4]/.......\"` (left is an identificator name, and right one is the xpath), and you'll have the script configured (remember you can add all xpaths, as many as you want). But maybe you want to be notified when any change ocurred, so you have to configure notifications.\n\n### Notifications\nIt's really easy too, if you've ever used Telegram. I asume you have Telegram account and a client to use it.\n1. Create a bot. (Talk to @BotFather, it will guide you)\n2. Copy bot token. (You can paste it now on json settings, otherwise you will have to do it later)\n3. Talk your new bot. You can talk it directly, or create a group (or channel) with your friends and add the bot there.\n4. Access next url on your browser (don't forget change \\\u003ctoken\\\u003e with your token): [https://api.telegram.org/bot\\\u003ctoken\\\u003e/getUpdates](https://api.telegram.org/bot\u003ctoken\u003e/getUpdates)\n\nYou will get a json like the next one:\n  \n![Get ChatID](https://github.com/arturo-source/check-webpage-change/blob/main/images/get-chatid.png)\n  \nThen you can pick the Telegram ChatID and paste it in the json settings too, remember `notify_telegram` has to be `true` to enable notifications. And you'll have script totally configured. But now you have to decide how often you want to be notified.\n  \n### Set up crontab\nCrontab is a really usefull tool that you may have installed in your Linux computer or server. It helps you to do recurring tasks automatically. And it's really easy to set up, but your first time use may will be confusing. You can access [this page to configure crontab easily](https://crontab.guru/).\nThe most common option will be on Sunday, at 12:00 for example, so you will type `0 12 * * 0` next to the command. But maybe you want to execute it always you turn on the computer, then you will type `@reboot` next to the command.\n \nTo open cron configuration you will open a terminal and type `crontab -e`, it allows you to edit cron configurations. You will open a file with an editor, it may will be `nano`. So you only have to paste the next command and let it be:\n```\n* * * * * php /route/to/script/check-change.php\n```\nAnd finally save set up with `ctrl+o` and close editor with `ctrl+x`.\n\nOther posible configuration is to check webpage all days at certain hour, but you want to be notified even if it's been changed or not. It's easy too. You only have to set `check_changes` to `false` in json settings, this will make it not distinguish if there are changes or not, and if you have `notify_telegram` with `true` value, it'll notify you anyway. This is an example to be notified all day at 12:00\n```\n0 12 * * * php /route/to/script/check-change.php\n```\n  \nAnd that's it. Thanks to arrive since here, I hope i could help you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturo-source%2Fcheck-webpage-change","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturo-source%2Fcheck-webpage-change","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturo-source%2Fcheck-webpage-change/lists"}