PHP Script Version Checking/Notification -
how can check version of script against online file see if it's latest version?
for clarification, i'm talking script wrote, not version of php. i'd incorporate way end user tell when i've updated script.
to specify second (more simple) solution phjr proposed:
have file version.txt
on own public server , include following function deployed project/script:
define('remote_version', 'http://your.public.server/version.txt'); // version of deployed script define('version', '1.0.1'); function isuptodate() { $remoteversion=trim(file_get_contents(remote_version)); return version_compare(version, $remoteversion, 'ge'); }
version.txt
should contain recent version number, e.g.:
1.0.2
Comments
Post a Comment