virtual ftp directory?
Posted: Mon Apr 16, 2007 12:26 pm
Hey guys,
I've been searching all over the place and can't find anything that even relates to my problem- maybe I just don't know what to look for. I have a php script that basically retrieves urls to tons of files on a different server, generates links to them, and organizes the links in a tree structure. I can click each link separately, but I would like to be able to click a folder and download all of the files linked to in that folder. Right now it just opens all the links in new windows, but that is a really stupid way of doing it. One solution I tried was to use a zip class and download a zip of all the files, but this is really slow and would take up a lot of bandwith, since it has to copy all the files to the server first (at least that's the only way I could get it to work). The only other thing I could think of was to generate a directory of links (or sylinks, I don't quite understand the difference) to the files, which could then be browsed though an ftp client. I tried this, but I got very confused by the whole linking process. When I browsed my ftp site to download the links, they were deleted (literally deleted from the server). Basically I'm looking for a way to do either of the methods described above, or a completely different method, if anyone knows of one.
Thanks in advance,
Bob
edit:
I can link() local files, and download them with my ftp client. I can symlink() files outside of my server, but can't download them. I need to be able to link files from and outside server, and download them through ftp. I think. heh
edit #2:
Okay, I thought of possibly another way: I've made a php script that generates another php file that includes the file. Saves space on server, and acts just like the original file- when executed. Therein lies the problem. Obviously when you browse it in an ftp client, and download it, it downloads the source. All I need is for it to execute the file before arriving to the ftp client. is that possible?
I've been searching all over the place and can't find anything that even relates to my problem- maybe I just don't know what to look for. I have a php script that basically retrieves urls to tons of files on a different server, generates links to them, and organizes the links in a tree structure. I can click each link separately, but I would like to be able to click a folder and download all of the files linked to in that folder. Right now it just opens all the links in new windows, but that is a really stupid way of doing it. One solution I tried was to use a zip class and download a zip of all the files, but this is really slow and would take up a lot of bandwith, since it has to copy all the files to the server first (at least that's the only way I could get it to work). The only other thing I could think of was to generate a directory of links (or sylinks, I don't quite understand the difference) to the files, which could then be browsed though an ftp client. I tried this, but I got very confused by the whole linking process. When I browsed my ftp site to download the links, they were deleted (literally deleted from the server). Basically I'm looking for a way to do either of the methods described above, or a completely different method, if anyone knows of one.
Thanks in advance,
Bob
edit:
I can link() local files, and download them with my ftp client. I can symlink() files outside of my server, but can't download them. I need to be able to link files from and outside server, and download them through ftp. I think. heh
edit #2:
Okay, I thought of possibly another way: I've made a php script that generates another php file that includes the file. Saves space on server, and acts just like the original file- when executed. Therein lies the problem. Obviously when you browse it in an ftp client, and download it, it downloads the source. All I need is for it to execute the file before arriving to the ftp client. is that possible?