I was wondering how to detect when a page gets updated with PHP. I’ve researched things on Google, but came across nothing.
What I want to do is call a specific function when a page gets updated. I will be running a cron job in order to run the code.
I want something like this:
if (page updated) {
//functions
}
else
{
//functions
}
If I can’t do something like that then I want to at least know how to detect when a page gets updated with PHP. Please help!
Use file_get_contents() to get the page’s content, create a MD5 hash from it, and compare it with the hash you already have. I suggest storing this hash in a simple file.
Don’t forget setting allow_url_fopen to On.