this is purely an academic question.

question: What is the best way to handle version checking in php.

example: Let's say I have a CMS like script and so does other users, and I have the version number defined somewhere in the script, and on a certain page, it should compare the current version number with the version hosted on my server or a SVN/GIT repo.

I'm not looking for an entire script, I just need someone to point me in the right direction to find the "best"/most recommended practice.

like is it possible to get data off a specific URL on a different server? or is it better to do this via ajax and just print the version number in a hidden field?