Jump to content


Photo

Help, How to make a Version Checker


  • Please log in to reply
6 replies to this topic

#1 shad_dow

shad_dow
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 06 July 2006 - 03:36 PM

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

<?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>";
}

?>

thanks

#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 06 July 2006 - 03:40 PM

so uh, what exactly are you stuck on.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 July 2006 - 03:40 PM

Well what do you want it do when its the correct version?

#4 shad_dow

shad_dow
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 06 July 2006 - 03:48 PM

hi

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

<?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>";
}

?>

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 ???

#5 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 06 July 2006 - 03:55 PM

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?
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#6 shad_dow

shad_dow
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 06 July 2006 - 04:01 PM

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 :)



#7 shad_dow

shad_dow
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 06 July 2006 - 06:04 PM

hi

Ive Solved IT

Thank you to those that helped

cheers




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users