Click to See Complete Forum and Search --> : Download script?
drhart4000
01-06-2007, 02:22 AM
Does any one know of a free php download script that will hide where your downloading your files from, and use an external server?
Let me explain, I link someone to http://mydomain.com/download/index.php?file=file.mov
and will pull the file from somthing like http://192.168.1.128:8080/files/file.mov.
but when the user downloads or links to the file all they see is:
http://mydomain.com/download/index.php?file=file.mov
so i can keep my second server so called "secret".
in the script config i would put the download directory like:
http://192.168.1.128:8080/files/
and it would just accociate the file names with the same names as the ones I'm requesting and form a link.
so the file travels from:
http://192.168.1.128:8080/files/file.mov
to
http://mydomain.com/download/index.php?file.mov
and
user is linked to the file my the:
http://mydomain.com/download/index.php?file.mov address
I found one script but the files have to be stored on the same server, no external sources, which is where these files are kept. If someone would know how to add http support to it I would appreciate it.
Download here:
http://cateyepro.com/testing_server/download_script/get/dcl2.0.zip
thank you,
Wayne
NightShift58
01-06-2007, 12:55 PM
This http://192.168.1.128:8080/files/file.mov indicates that both servers are very close to each other.
Wouldn't mapping the external server's drive do the job?
drhart4000
01-06-2007, 02:51 PM
Hey NightShift58, back helping me out again...
sorry, thats a little confusing, inst it.
No the one server is a shared hosted server with godaddy, and the other server is my server, maybe I should have explained.
drhart4000
01-06-2007, 02:54 PM
so the real ip address would be somthing like:
74.137.152.72:3124 ==> 192.168.1.128:8080
^No its not my IP^
NightShift58
01-06-2007, 04:40 PM
so the real ip address would be somthing like:
74.137.152.72:3124 ==> 192.168.1.128:8080
^No its not my IP^Now you've lost me.
The GoDaddy Server IP is 74.xxx.xxx.xxx and your's is 192.xxx.xxx.xxx.
Is that right?
In case that should be the case, you won't be able to access anything with 192-something over the net
drhart4000
01-06-2007, 06:29 PM
No, my godaddy ip is 208.109.14.xxx and my home server is 74.137.152.xxx
my godaddy server has a domain http://mydomain.com
and my home server is reachable via static ip address of 74.137.152.xxx and port 3124 thus the domain is http://74.137.152.xxx:3124/
and then my router at 74.137.152.xxx redirectes port 3124 requests to ip 192.168.1.128 using port 8080 (this all works fine...
I just need a script that will use the address http://74.137.152.xxx:3124/files
(use my external server at 72.137.152.xxx)
for some reason i was just telling you my lan ip for the server and not the wan ip of the server.... sorry...
so instead of using a directory on my godaddy server i need to link the a directory at http://74.137.152.xxx:3124/files/mydomain/
But instaid of having them remember the ip port dir and file they just type
http://mydoamin/download/?file.mov
rather than somthing like http://74.137.152.xxx:3124/files/mydomain/download/file.mov
thank you,
Wayne
NightShift58
01-06-2007, 06:36 PM
What kind of files (size) are you trying to proxy? Is file_get_contents() an option?
I used the word "proxy" on purpose. Whether a script is modified or whether your own scripts do it, if you do not want your IP displayed or available to the users, your GoDaddy server will have to fetch the file and then pass it on.
drhart4000
01-06-2007, 06:41 PM
It will mostly be video files like .wmv .swf .mov, shortest 5 min, longest i would ever have is probly7-10 min. so i would count on the bigest about100 mb maybe, but it could be more... I cant realy say for shure...
drhart4000
01-06-2007, 06:42 PM
And this will also use up bandwidth on my godaddy host service correct?
And how will php go about doing this?
NightShift58
01-06-2007, 06:46 PM
If they're that large, it may be a problem, though.
Your GoDaddy server will have to fetch the file and only then can a file be served to your users.
Are you absolutely "hiding" or would adding a DNS entry be a solution?
drhart4000
01-06-2007, 06:48 PM
like dns a sub domain? download.mydomain.com dns == 74.xxx.xxx.xxx ?
aussie girl
01-06-2007, 06:49 PM
you can use dyndns.org and create an account with your static IP, then the website would be whatever.your.choose.from the options they have, that's what I do, it's free
NightShift58
01-06-2007, 06:50 PM
Yes, something like that...
(Gotta run. Be back in about 45 mins).
drhart4000
01-06-2007, 06:51 PM
this domain is for a school and they do morning anocments/ news and want to put it up on the web, and thinking of different possiblites to save space on our godaddy web server...
drhart4000
01-06-2007, 06:54 PM
you can use dyndns.org and create an account with your static IP, then the website would be whatever.your.choose.from the options they have, that's what I do, it's free
I don't really mind linking to my external server at the ip address, I just would like to make it look like everything is coming from the same server...
aussie girl
01-06-2007, 06:54 PM
so the school has it's own IP and hosting a website or is it yours?
drhart4000
01-06-2007, 07:14 PM
The director in charge of the video production program bought go daddy hosting and I am setting up a way for them to upload videos and stream videos off of a server i setup but i need it to go thru their hosting server or look like its coming from their server (to the visitors, just to make it easy on their eyes).
drhart4000
01-06-2007, 07:25 PM
The main resone i have them uploading to this secondary server all they can do is upload through FTP they cannot delete files... files are not shown they upload the files and log out and the files are now in the directory added to the original files.
If i could do that with godaddy I would but i have to use a second server to store the files.
NightShift58
01-06-2007, 08:07 PM
I didn't mean DynDNS - because then you end up with a completely different domain name.
If you have access to DNS setup through GoDaddy, you could set up another subdomain (www2.myschool.com) and it would all still look pretty uniform in terms of "corporate image".
You mention bandwidth in an earlier post. If you end up fetching files through the GoDaddy server, you'll end up, of course, with double bandwidth for every file: once from you to goDaddy and once more from GoDaddy to the user.
You could go for a halfway solution:
Your "home" server has all files - the main repository.On the GoDaddy server, you would only keep the files that are "likely" to be downloaded, i.e. announcements made in the last "xx" weeks/days.You could run a script to update the links on a regular basis (which file is where - if it's not on GoDaddy, it's at "home")
drhart4000
01-06-2007, 08:14 PM
I didn't mean DynDNS - because then you end up with a completely different domain name.
Someone else posted that I was telling them thats not what i wanted
NightShift58
01-06-2007, 08:15 PM
I had seen that. I just wanted to address it, just in case...
drhart4000
01-06-2007, 11:49 PM
Thanks for the help, I'll give it a try...
NightShift58
01-07-2007, 12:12 AM
Couldn't really do much but you're welcome.
MrCoder
01-07-2007, 04:48 AM
Can this be done via DNS?
For example setting up an A record for "dls.mydomain.com" and having that point to the IP address of the server you are hosting the files from?
This wouldnt mask the IP of the file hosting server, but it would make it look like it came from your site?