Jump to content

Archived

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

shad_dow

Help, How to make a Version Checker

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

Share this post


Link to post
Share on other sites
Well what do you want it do when its the correct version?

Share this post


Link to post
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 ???

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
basicly

say there using v1.0 and on the server is v2.0 , i wanted a way for the script to check and tell them that a new version is avaible for download .

and yes i am trying to run before i can walk :)

Share this post


Link to post
Share on other sites

×

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.