I have written a WordPress plugin, and I am trying to find the best way of having the program check for updates on my server, and downloading them automatically at the user's request. This will basically be used to download extra features that I don't want to put into the WordPress repository due them not having the GNU license.
I've coded the program to check for updates, what I am not sure about is the download part.
Should I use file_get_contents() and then fwrite() to write the results to a directory? I'm sure that's a way of doing it, but I am looking for the most cross-server safe way of doing this because the plugin is used by thousands of people on different setups, although they are all PHP, and most of them are PHP5+. I am afraid certain hosts may have some sort of security preventing me from doing this. Would cURL be a better option?
Thank you.