Code Comments
Programming Forum and web based access to our favorite programming groups.Hello all, I'm in the midst of developping a modular site generating tool that would allow people to set-up a base install of the site and then add "modules" to provide custom functionality for their purposes. Some early examples can be seen at http://silly.kicks-ass.net and http://kog.ca (both sites work with the same "engine" if I can call it that). At the moment I'm trying to add a feature that would allow users to choose the modules they want to install from a central server. The module listing and descriptions would be served up through an xml file. When the user decides to install a module they would simply click install and the files would be copied directly from the central server through a script. Now what I'm wondering is: Does anyone have any idea of the best method to copy the files over through PHP from a central server is? Would implememting and anonymous FTP "read only" site make the most sense? What about compressing the files? I know that the gz family of functions is not part of the default install in PHP 4+ and I hesitate in requiring users to add them since many people who use ISPs to host their site do not have that option. I don't even think it's available for the PHP runnning on Windows and I would like the solution to work on all server types. I would love to have some ideas thrown at me here. I'm willing to try anything. Kogger
Post Follow-up to this messageIn my post I mentioned the http://silly.kicks-ass.net as a working example of the engine I'm writing. Please be warned that the content of the postings can be of dubious taste. I have no control over the content but I thought it would be polite to issue a warning. kogger wrote: > Hello all, > > I'm in the midst of developping a modular site generating tool that > would allow people to set-up a base install of the site and then add > "modules" to provide custom functionality for their purposes. Some > early examples can be seen at http://silly.kicks-ass.net and > http://kog.ca (both sites work with the same "engine" if I can call > it that). > At the moment I'm trying to add a feature that would allow users to > choose the modules they want to install from a central server. The > module listing and descriptions would be served up through an xml > file. When the user decides to install a module they would simply > click install and the files would be copied directly from the central > server through a script. > Now what I'm wondering is: Does anyone have any idea of the best > method to copy the files over through PHP from a central server is? Would > implememting and anonymous FTP "read only" site make the most > sense? What about compressing the files? I know that the gz family > of functions is not part of the default install in PHP 4+ and I > hesitate in requiring users to add them since many people who use > ISPs to host their site do not have that option. I don't even think > it's available for the PHP runnning on Windows and I would like the > solution to work on all server types. I would love to have some ideas > thrown at me here. I'm willing to try anything. > Kogger
Post Follow-up to this message> Now what I'm wondering is: Does anyone have any idea of the best method
> to copy the files over through PHP from a central server is? Would
> implememting and anonymous FTP "read only" site make the most sense? What
> about compressing the files? I know that the gz family of functions is no
t
> part of the default install in PHP 4+ and I hesitate in requiring users to
> add them since many people who use ISPs to host their site do not have tha
t
> option. I don't even think it's available for the PHP runnning on Windows
> and I would like the solution to work on all server types. I would love to
> have some ideas thrown at me here. I'm willing to try anything.
just make an fopen on your server.
fopen("http://www.yxc.de?module=blog");
then return php-code which generates the new files. You will make this in a
loop
and often again call this function to avoid servert timeouts.
Hope this idea helps ...
Greetings Andy
Post Follow-up to this messageHi Andreas,
this is a good idea. I'll try it out and see how it handles things. I'm
curious to see if any problems will come up if I try to transfer some image
(ie binary) files.
thanks for the suggestion.
Andreas Frey wrote:
>
> just make an fopen on your server.
> fopen("http://www.yxc.de?module=blog");
>
> then return php-code which generates the new files. You will make
> this in a loop and often again call this function to avoid servert
> timeouts.
> Hope this idea helps ...
>
> Greetings Andy
Post Follow-up to this messageHey Andreas,
just wanted to pop in and say that your idea worked out great. I was
enven able to throw in some error handling and rollback if something goes
wrong.
Thanks for the idea.
Andreas Frey wrote:
>
> just make an fopen on your server.
> fopen("http://www.yxc.de?module=blog");
>
> then return php-code which generates the new files. You will make
> this in a loop and often again call this function to avoid servert
> timeouts.
> Hope this idea helps ...
>
> Greetings Andy
Post Follow-up to this message> Hey Andreas, > > just wanted to pop in and say that your idea worked out great. I was > enven able to throw in some error handling and rollback if something goes > wrong. > > Thanks for the idea. NP I am sure i will need some help as well at another time ... Greetings, Andreas
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.