Check remote server for script update

Posted on 2006-04-01
Last Modified: 2009-12-16
I'm trying to write a function within my opensource script that will check with a remote server (my site) to see if there is a new version of the script being installed on the users server. Ideally, I would like to be able to have the user click a button to automatically transfer the updated script files to their server if there is an update available and then unzip the files on the server.

I've tried several different functions, but nothing has come close. I can't do FTP since I don't want the FTP username/password made available to everyone. I also can't seem to get the two servers to communicate to determine if there is an update in the first place. I've read info about CURL, but it seems like it can be turned off by some webhosts, so it might not work for everyone.

Any help?

Question by:savetheorcas
    1 Comment
    LVL 49

    Accepted Solution

    I have written a function which is quite complicated but is used to synchronise two servers. This however might be some overkill for just a single file.

    It is located at and is in Dutch.

    Basically the script consists of two files:

    runsync.php which is located at the child/slave server, and sync.php which is located at the parent/master server.

    runsync.php calls the sync.php which generates a list of md5() hashkeys for all files that need to be synchronized.
    runsync.php will match those keys against the hashes of the locally stored files, and will update when necessairy.
    The updating is facilitated through the both scripts.

    However, although this works, this might be overkill for you.


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now