Jump to content

File download from a remote directory


raj76

Recommended Posts

Hi All,

 

This is my first post here.So if there is any mistake plz dont mind.

 

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

 

The virtual 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?filename=a.jpg#b.mpeg

 

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 suggest me...Thanks in advance...Raj

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.