Click to See Complete Forum and Search --> : file download from remote directory


raj_2006
07-16-2007, 07:38 AM
Hi All,

Previously I was trying to implement an idea to browse the files from remote server but at a certain point I thought of the below idea but dont know wether I am right or wrong.So here I am again.....:).

Basically it will download the big files which has uploaded via ftp in the server directory

Lets demonstrate it.

***********************ADMIN***********************
There is a form in form.php taking

the movie name
category
physical path. eg /home/domainusername/public_html/upload/
virtual path eg http://www.domain.com/upload

Thevirtual and physical path can be of the server itself from where the form is posting or to any remote server.Now in the post section I am redirecting the pointer to the www.domain.com/dir.php

in dir.php I am fetching all the filenames based on the posted virtual path and then I am keeping the filenames in a string separated by # and again I am redirecting the page to www.domain.com/files.php

from files.php I am inserting the filenames in the mysql table.The db structure is something like this.

Table Movie
movieid,moviename,category,purl,aurl

Table file
fileid,movieid,filename
***********************ADMIN END***********************
I can display the files in the frontend if the above idea works.Now how can I download the files.I have the physical path + virtual path + filename

So combining these 3 things how can i download a file?

Please help me out.

Thanks in advance....Raj