Automatic site updates (version upgrade of PHP files)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
OMA
Forum Newbie
Posts: 7
Joined: Wed Jun 11, 2008 10:25 am

Automatic site updates (version upgrade of PHP files)

Post by OMA »

Hello, do you know how can I implement site auto-updates, similar to what some forums have?
For example, Simple Machines (SMF) forums have this feature, where the admin panel informs that a new version is out, and offers to autoupdate from the official servers.

So, how is this done? I'd need a way to get a PHP script to automatically download a package from a different server, unzip it, and overwrite the relevant PHP files of the server.

I hope you can help me.

Thank you!
OMA
Forum Newbie
Posts: 7
Joined: Wed Jun 11, 2008 10:25 am

Re: Automatic site updates (version upgrade of PHP files)

Post by OMA »

No answer? :(
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Automatic site updates (version upgrade of PHP files)

Post by Ambush Commander »

While informing the user that a new version is available is generally desirable, and implemented by having the PHP script check the server (using CURL, sockets or some other http get function) for a new version, rewriting scripts without user intervention is considered bad form.
OMA
Forum Newbie
Posts: 7
Joined: Wed Jun 11, 2008 10:25 am

Re: Automatic site updates (version upgrade of PHP files)

Post by OMA »

Why is it bad form? Maybe because of security concerns?
So you think SMF shouldn't autoupdate as it does now?

I'll take a look at CURL: http://es2.php.net/manual/en/book.curl.php

Thanks for your reply!

OMA
Post Reply