Jump to content

Downloading files


cxian

Recommended Posts

Hi again! I am going really desperate on this problem that I have in downloads.
Please somebody who have a better idea to solve things out, please help.

Just like I mentioned. I have a site that end users can download/upload video files.
The videos is stored in the same server as well as the php codes, though of course
in different directory. Everything goes well until I begun losing available space for new
uploaded videos. I had no choice but to moved other videos on a different server.
The big problem is how can I able to download the remote video files.

The function in the current site I am using is that I created a [b][i]symlink($file_realpath, $file_symlink)[/i][/b]
where [b][i]$file_realpath = "/some/dir/";[/i][/b] then provided a [b][i]a href="http://url/.$file_symlink./file"[/i][/b]
that end user can [b][i]Right-Click->'save target as...'[/i][/b] to download the file. This is OK when
the video files is in the same server but how about the other video files in other server?

When I changed [b][i]$file_realpath[/i][/b] into [b][i]"http://remote_add/some/dir/"[/i][/b], its comes to a failure.
I already tried to used [b][i]ftp_connect[/i][/b], [b][i]ftp_chdir[/i][/b], before the [b][i]<a href>[/i][/b], but it doesn't also help.

How can I able to get this remote files for download? Please anyone, any idea you have?

Many Thanks!
Link to comment
https://forums.phpfreaks.com/topic/35632-downloading-files/
Share on other sites

thanks for the reply.

I already have it that way but the video always gets corrupted.
However, Just like to add that I have a httpdownload class (not in use)
that says serves to handle quality downloads results but I have no idea
how to call it in a <a href>. maybe this is also a solution.

Also, ftp_get is useful in such fixed local directory but how can it implies
in end-users which is to them where they want to save the file.
Link to comment
https://forums.phpfreaks.com/topic/35632-downloading-files/#findComment-168783
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.