Jump to content

Help, How to make a Version Checker


shad_dow

Recommended Posts

hi

i would anybody to giude me in how i can use php to check via button in my scripts to see if theres a newer visions

so far i have this and now im stuck

[code]<?php
$currentVersion = "1.0";
header("Content-type: text/plain");

if($_GET['version'] == $currentVersion) {
// do nothing
} else {
echo "<div><p>A new version of the Sample theme, version $currentVersion, is now available. Your installed version is ${_GET['version']}.</p></div>";
}

?>
[/code]

thanks
Link to comment
https://forums.phpfreaks.com/topic/13856-help-how-to-make-a-version-checker/
Share on other sites

hi

its supposed to some how check agaist <?php $installedVersion = "1.0"; ?> on the sever

[code]<?php
$currentVersion = "1.0";
header("Content-type: text/plain");

if($_GET['version'] == $currentVersion) {
// do nothing
} else {
echo "<div><p>A new version of the Sample theme, version $currentVersion, is now available. Your installed version is ${_GET['version']}.</p></div>";
}

?>
[/code]

if version does not = currentversion it shold then run the echo ,

my prob is how do i get the $_GET['version']  from checking $installedVersion ,

do i create a form ???
ah. so you have put the cart before the horse, so to say.

the GET method is most commonly used with dynamic links.  maybe it would help if you explained what it is that you are trying to get the version of? are you wanting the user to enter in their current version number of whatever, and then you check it? is your script supposed to auto-detect the user's version number for whatever?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.