Does it HAVE to be PHP? You can check out this project which does exactly that and way more https://github.com/dgtlmoon/changedetection.io it uses python but its not necessary for you to know it