cxian Posted January 25, 2007 Share Posted January 25, 2007 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 coursein different directory. Everything goes well until I begun losing available space for newuploaded 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 whenthe 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 More sharing options...
trq Posted January 25, 2007 Share Posted January 25, 2007 You can't make symlinks against a remote server. Just make your links point to the files on the remote server. eg;[code]<a href="http://someotherserver.com/file">download</a>[/code] Link to comment https://forums.phpfreaks.com/topic/35632-downloading-files/#findComment-168768 Share on other sites More sharing options...
cxian Posted January 25, 2007 Author Share Posted January 25, 2007 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 ideahow 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 impliesin 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.