/    Sign up×
Community /Pin to ProfileBookmark

Automatic Software Update…Possible?

Alright, I’m making free forum software, but I need a little help with something…

In the Admin CP I’d like for there to be a little text that says if the current forum software is up-to-date. I’m thinking this should be PHP. Am I correct? If not, please let me know what I should use for this.

If so, could someone help me out.

If you can help me, I’d gladly put a comment with whatever you want in it near the code you provide me in the forums software forever.

Thanks.

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@chazzyMay 08.2006 — one way would be to have an XML (or really any kind) file on your hosting server, that contained the latest version number. Your script then could read this file, and compare the value there with the version of itself and inform them that way.
Copy linkTweet thisAlerts:
@Paintball24authorMay 08.2006 — one way would be to have an XML (or really any kind) file on your hosting server, that contained the latest version number. Your script then could read this file, and compare the value there with the version of itself and inform them that way.[/QUOTE]
Can you code that for me please?
Copy linkTweet thisAlerts:
@SheldonMay 08.2006 — [code=php]
$newest_version = "2.345";
$current_version = "2.21";

if($current_version < $newest_version)
{
echo("You need to upgrade from version ".$current_version." to ".$newest_version);
}else{
echo($current_version);
}
[/code]

how you populate the $newest_version , maybe from a global databse or something?



EDIT: I shouldnt be so negitive
Copy linkTweet thisAlerts:
@Paintball24authorMay 09.2006 — [code=php]
$newest_version = "2.345";
$current_version = "2.21";

if($current_version < $newest_version)
{
echo("You need to upgrade from version ".$current_version." to ".$newest_version);
}else{
echo($current_version);
}
[/code]

how you populate the $newest_version , maybe from a global databse or something?



EDIT: I shouldnt be so negitive[/QUOTE]


or a text file. (?)
Copy linkTweet thisAlerts:
@NogDogMay 09.2006 — [code=php]
$thisVersion = "1.0.2";
echo "<p id='version'>Fubar Forums Software vers. $thisVersion";
$latestVersion = trim(@file_get_contents("http://somewhere.com/latestversion.txt"));
if(!empty($latestVersion)) // in case this installation does not allow url fopen
{
if($thisVersion != $latestVersion)
{
echo " (version $latestVersion is now available)";
}
}
echo "</p>n";
[/code]
Copy linkTweet thisAlerts:
@chazzyMay 09.2006 — Can you code that for me please?[/QUOTE]

To be honest, this is a support forum, not a code give away forum. if you were able to write something as complex as a forum, this should be easy as cake.
Copy linkTweet thisAlerts:
@Paintball24authorMay 09.2006 — [code=php]
$thisVersion = "1.0.2";
echo "<p id='version'>Fubar Forums Software vers. $thisVersion";
$latestVersion = trim(@file_get_contents("http://somewhere.com/latestversion.txt"));
if(!empty($latestVersion)) // in case this installation does not allow url fopen
{
if($thisVersion != $latestVersion)
{
echo " (version $latestVersion is now available)";
}
}
echo "</p>n";
[/code]
[/QUOTE]


Awesome. I think I'll use this one because the current forum version would be a dynamic variable and couldn't update as a static value.

Thank you.

Would you like a comment near this code snippet for for efforts?
×

Success!

Help @Paintball24 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...